Open chenchongyu opened 7 years ago
问题解决了,参考了之前issues的解决办法,把tpl.html放到assets下
@TrustTheBoy xxx\node_modules\native-echarts\src\components\Echarts
Having the same problem, did you guys find a solution? If so, could you provide it for me in english? :)
any news on this?
@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 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
打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
这种问题怎么搞?