android版本开发时遇到的Bug
记录我在react-native android平台开发过程遇到的bug
1 error:undefined is not an object (evaluating ‘screenPhysicalPixels.width’)
解决方案:
android\app\build.gradle
修改
1 | compile "com.facebook.react:react-native:0.19.+" |
为
1 | compile "com.facebook.react:react-native:0.20.+" |
2 Error while updating property 'navIcon' of a view managed by: ToolbarAndroid
解决方案 1:
猜测是nacIcon没有package进apk,我在src文件,有nav_back@2x.png,nav_back@3x.png,我猜测就是这套机制出问题了,我现在尝试只保留nav_back.png,然后就没再报错,等有机会好好研究下打包机制
解决方案2:
turncompile 'com.facebook.react:react-native:0.20.+'
tocompile 'com.facebook.react:react-native:0.21.+'
参考Error while updating property ‘navIcon’ of a view managed by: ToolbarAndroid #134