react-native-echarts icon indicating copy to clipboard operation
react-native-echarts copied to clipboard

Error:Error: The file name must end with .xml or .png

Open chenchongyu opened this issue 9 years ago • 6 comments

打release包的时候报错了。。\android\app\src\main\res\drawable-mdpi\node_modules_nativeecharts_src_components_echarts_tpl.html Error:Error: The file name must end with .xml or .png

这种问题怎么搞?

chenchongyu avatar Dec 29 '16 09:12 chenchongyu

问题解决了,参考了之前issues的解决办法,把tpl.html放到assets下

chenchongyu avatar Dec 30 '16 02:12 chenchongyu

@TrustTheBoy xxx\node_modules\native-echarts\src\components\Echarts

chenchongyu avatar Feb 28 '17 12:02 chenchongyu

Having the same problem, did you guys find a solution? If so, could you provide it for me in english? :)

juiceo avatar Mar 03 '17 08:03 juiceo

any news on this?

juiceo avatar Mar 07 '17 14:03 juiceo

@lappalj4 put the tpl.html(\node_modules\native-echarts\src\components\Echarts) into android/app/src/main/assets, and then modify the index.js in \node_modules\native-echarts\src\components\Echarts. Modify the src like this: source={DEV?require('./tpl.html'):(Platform.OS === 'ios')?{uri:'./tpl.html'}:{uri:'file:///android_asset/tpl.html'}}

chenchongyu avatar Mar 08 '17 02:03 chenchongyu

@chenchongyu Thanks for the reply! I am still getting a gradle build error, because react native is trying to copy the tpl.html file into android/app/src/main/res/drawable-xxxx directories:

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> /....../android/app/src/main/res/drawable-mdpi/node_modules_nativeecharts_src_components_echarts_tpl.html: Error: The file name must end with .xml or .png

This only happens when I try to run react-native run-android --configuration Release

juiceo avatar Mar 08 '17 12:03 juiceo