2

I am developing ionic application which works fine in browser as well in android 5 versions but when i try to install my same apk in andriod 4 versions it simply displays white screen doesnt show up anything.

i had tried installing crosswalk, whitelist and splash screen plugins after installing all plugins i am unable to build. i am attaching the screenshots of installed plugins and build error please help where i am going wrong.

Please find the image where i installed the plugins

Also, Please find the error i am getting while building the app.

Please find the build error image

I am having the following in config.xml file

 <preference name="android-minSdkVersion" value="16" />
 <preference name="android-targetSdkVersion" value="16" />
Deepa
  • 184
  • 1
  • 2
  • 16

2 Answers2

2

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.

Deepa
  • 184
  • 1
  • 2
  • 16
1

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.

Community
  • 1
  • 1
thepio
  • 6,193
  • 5
  • 35
  • 54
  • I guess you are using a Windows laptop since your terminal says it's an Acer Aspire. Am I right? And just to make sure you are trying to build the android platform? – thepio May 20 '16 at 11:45
  • I updated my answer because I found another question with an answer on SO which might be helpful to you. – thepio May 20 '16 at 11:55
  • Thank you ! and i am using Ubuntu 14.04 LTS... i figured out the same solution ..it worked for me. but the apk file is quite huge after it worked. its around 30mb. – Deepa May 20 '16 at 13:04
  • Yes it's known that crosswalk adds around ~17mb (if I remember correctly) to the apk size. If you wish to have a smaller apk size you could take a look at Crosswalk lite https://crosswalk-project.org/documentation/crosswalk_lite.html – thepio May 20 '16 at 13:10
  • crosswalk lite increase the apk to same size. – Deepa May 23 '16 at 09:34
  • I'm sorry, I haven't used crosswalk in my apps so I can not help you with that. I'm sure you can find information about that issue from google or other SO posts? – thepio May 23 '16 at 09:40
  • i was using beta version of xwalk earlier gives me apk of size around 33MB where actual app size is 11MB now i am using canary version gives me apk of size around 21MB where actual app size is 11MB – Deepa Jun 15 '16 at 08:10