White screen just for Android


#1

Prior clarification: There are more topics in this forum and Stackoverflow about White Screen only in Android but no one works for me, may be because I am using ionic2.

I have this error running this open source project from IONIC team. https://github.com/driftyco/ionic-conference-app/

I don’t have any problem running the demo in with ionic serve or ionic emulate ios, but when I try to run in Android (virtual devices created with Android Studio 1.5.1 or Genymotion 2.6.0)

This what I got with chrome://inspect for Android Virtual Device Nexus One API 23 (more info about this virtual device below)

This what I got with chrome://inspect for Android Virtual Device Google Nexus 5 - 5.1.0 - API 22 - 1080x1920 (Created with Genymotion)

My system info

$ sw_vers (to get Operating system info)

ProductName:	Mac OS X
ProductVersion:	10.11.4
BuildVersion:	15E65

$ node -v
v4.4.1
$ npm -v
2.14.20
$ npm list -g --depth=0

/usr/local/lib
    ├── bower@1.7.7
    ├── cordova@6.1.0
    ├── grunt-cli@1.1.0
    ├── ionic@2.0.0-beta.23
    ├── npm@2.14.20
    └── npm3@1.1.0

$ ionic info

WARN: ionic.config.js has been deprecated, you can remove it.

Your system information:

Cordova CLI: 6.1.0 (cordova-lib@undefined)
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.23
Ionic App Lib Version: 2.0.0-beta.13
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v4.4.1
Xcode version: Xcode 7.3 Build version 7D175

$ ionic platform add android

WARN: ionic.config.js has been deprecated, you can remove it.
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: io.ionic.conference
	Name: Ionic_Conference
	Activity: MainActivity
	Android target: android-23
Android project created with cordova-android@5.1.1
Installing "cordova-plugin-whitelist" for android
Saving platform to package.json file

$ ionic run android

WARN: ionic.config.js has been deprecated, you can remove it.

Running 'run:before' gulp task before run
[19:40:52] Starting 'sass'...
[19:40:52] Starting 'html'...
[19:40:52] Starting 'fonts'...
[19:40:52] Starting 'scripts'...
[19:40:52] Finished 'scripts' after 50 ms
[19:40:52] Finished 'html' after 81 ms
[19:40:52] Finished 'fonts' after 80 ms
[19:40:53] Finished 'sass' after 799 ms
[19:40:53] Starting 'build'...
[19:41:03] Finished 'build' after 11 s
[19:41:03] Starting 'run:before'...
[19:41:03] Finished 'run:before' after 26 μs

ANDROID_HOME=/Users/coto/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
No target specified, deploying to emulator
:preBuild UP-TO-DATE
----- many more debug info ------
:assembleDebug
:cdvBuildDebug

BUILD SUCCESSFUL

Total time: 17.717 secs
Built the following apk(s):
	/Users/coto/Desktop/ionic-conference-app-master/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /Users/coto/Desktop/ionic-conference-app-master/platforms/android/build/outputs/apk/android-debug.apk
INSTALL SUCCESS
LAUNCH SUCCESS

Android Virtual Device Nexus One API 23 (created in Android Studio 1.5.1)

Name: Nexus_One_API_23
CPU/ABI: Google APIs Intel Atom (x86)
Path: /Users/coto/.android/avd/Nexus_One_API_23.avd
Target: Google APIs (API level 23)
Skin: nexus_one
SD Card: 100M
Snapshot: no
hw.lcd.density: 240
hw.dPad: no
avd.ini.encoding: UTF-8
hw.camera.back: none
disk.dataPartition.size: 200M
hw.gpu.enabled: yes
runtime.network.latency: none
skin.dynamic: yes
hw.keyboard: yes
runtime.network.speed: full
hw.device.hash2: MD5:36362a51e6c830c2ab515a312c9ecbff
hw.ramSize: 512
tag.id: google_apis
tag.display: Google APIs
hw.sdCard: yes
hw.device.manufacturer: Google
hw.mainKeys: yes
hw.accelerometer: yes
hw.trackBall: yes
hw.device.name: Nexus One
hw.sensors.proximity: yes
hw.battery: yes
AvdId: Nexus_One_API_23
hw.sensors.orientation: no
hw.audioInput: yes
hw.camera.front: none
hw.gps: yes
avd.ini.displayname: Nexus One API 23
snapshot.present: no
vm.heapSize: 32
runtime.scalefactor: auto

I tried with Genymotion too in this virtual device and I had the same white screen
Google Nexus 5 - 5.1.0 - API 22 - 1080x1920


#2

Hi, did you already try to build an empty ionic 2 project to your Android device? Although the build process is running fine, I can’t exclude the fact that there’s just a small bug in your own code or that it has something to do with your Ionic installation. Try it with a starter template for example. Then just hit ionic run android and see if that one works.


#3

Thanks @luukschoen for you answer.

I did what you said and the project run successfully.

Actually I am running this open source project of IONIC https://github.com/driftyco/ionic-conference-app so it is an issue of that project.

Thanks!!


#4

@focusapp Looks like you’ve already gotten an answer on the github issue

Thanks for the detailed report!


#5

@mhartington Yes, this commit fix it https://github.com/driftyco/ionic-conference-app/commit/094fccc9035cab9e993e34e1b91c724ecdb91196

Thank you