Ionic app shows white screen on android 4 versions

社会主义新天地 提交于 2019-12-06 11:09:53

So, i found the solution to this issue.. Installed Crosswalk plugin which adds around 17MB to the app size then i tried installing Crosswalk Lite which worked well.

Here are few things you should look for in your config.xml :
1. <preference name="android-minSdkVersion" value="16"/>

2.Most important is this one : I was using beta version of xwalk earlier

 <preference name="xwalkVersion" value="xwalk_core_library_beta:18+"/>
 <preference name="xwalkMode" value="embedded"/>

gives me apk of size around 33MB where actual app size is 11MB

now i am using canary version

<preference name="xwalkVersion" value="xwalk_core_library_canary:17+" />
<preference name="xwalkMode" value="lite" />

gives me apk of size around 21MB where actual app size is 11MB.

Please refer to thepio answer above it helped alot.

thepio

Ionic officially supports Android versions 4.1.x and above. Your min SDK version is the required 4.1.x but are you testing on an older Android version like 4.0.x? You could set:

<preference name="android-minSdkVersion" value="15" />
<preference name="android-targetSdkVersion" value="19" />

See this post on the official Ionic blog: http://blog.ionic.io/market-share-movement-android/

EDIT based on your comment:

You should see this great answer on SO

In the answer above they state that you should make sure you have Android Support Repository and Google Repository downloaded because crosswalk plugin is building two apks : one for ARM, the other for x86.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!