White screen after run android


#1

Hello Fellas,
I’ve created an app. Below is what I did :

  • I need it for Android SDK 16 (Android 4.1.1). BUT when I did ionic cordova platform add android it forces intall android 7.0.0. I tried ionic cordova platform add android@4.1.1 with no success. Therefore, I changed 7.0.0 by 4.1.1 in packages.json. In config.xml, minSdkVersion, maxSdkVersion, targetSdkVersion are ALL set to 16.

  • The manipulation above got my app to be deployed via ionic cordova run android But with this, I got Connection to server was unsuccessful to “www/assets/index.html

  • To solve that, I used <preference name="loadUrlTimeoutValue" value="70000" /> in config.xml. But now when I run the app, it gets stuck on a white screen. No GUI appears. I tried setting preferences as suggested here but it did not change anything,

I need my app to be compatible with API 16 at least


#2

All I can tell you is that cordova-android version numbers are completely indpendent of Android SDK/OS version numbers.


#3

I have only Android 16 in my Android Studio sdk folder… So the changes I made prevented cordova to download Android 26 when I execute the ** ionic cordova run android ** or ** ionic cordova run android --prod**. I even tried with --release… In the AndroidManifex.xml, min, max and target SDK were automatically set to 16 when I made ** ionic cordova platform add android**… If it was an IDE, at least I’d see any error and debug it


#4

Well, Ionic does not support any version of Android below 4.4, so this isn’t going to work.


#5

I’m afraid I have to disagree here… As long as Cordova is the build system for Ionic, I think I can safely assume Android 4.1 and later versions are supported. Please read this answer


#6

I can only repeat with @rapropos has already said:

Ionic does not support any version of Android below 4.4

Only yesterday someone downloaded my ionic app and it did not work on their device which was running Android 4.2. Parts of it was OK - but the overall experience was not good.
In the end they used the website version (which is from the www folder) and it worked fine.

Am i right in thinking that the problem is not that you want Ionic to run on Android 4.1 - but that your Android SDK is set to 4.1. If that is the case why not just update the Android SDK to the latest version?


#7

See this, and note that crosswalk is EOL now as well.


#8

@rapropos told you already, but you ignored it:
Cordova-Android 4.1.1 has nothing to do with Android 4.1.1. In the Cordova Android docs is a table that shows the supported versions of Android.

But be aware: Ionic itself will probably also not work with that Android version very well.


#9

Nice point. Thank you. It’s educated on that particular point but still not over…The problem still exits when as I said before


#10

Which version did you install then?

To debug problems with your app: Did you remote debug the problem on the device already? Follow these instructions here to debug the problem in Chrome dev tools: https://ionic.zone/debug/remote-debug-your-app#android Look at the console and network tabs for errors.

But in general you won’t get help for old versions of Cordova and Android here as it is just too much trouble.


#11

Wow did not know about that… I’m trying it right now…Having little issues though… I see my device in Googles Inspector. But when I launch the app, nothing shows in console nor network tab (neither for regular inspector nor for Remote device insector…)


#12

I tested the app on a higher Android OS than my previous device. It works there… What can I do now to make it work on the older device (CrossWalk di not solve anything)


#13

As I said: I can’t and won’t help you with outdated and unsupported Android versions. Good luck.


#14

Nope… I’d actually like to have my apk set up for minSdk = 16 ; maxSDK = 16 and targetSDK =16. The installed SDK in my machine are SDK 16 and SDK 24


#15

If you are dead set on supporting old Android versions - all I can advise is that you develop the Ionic app until you are happy with it - then rewrite in Android SDK - but good luck as you will need it!


#16

No problem… Thanks for your hints though