Yesterday, I built and run my app on my Android device and this version worked fine.
Since, I improved my app (content view and controller of some modules) and today, I have a black screen on device.
ionic serve
ionic cordova run android --debug
I think that maybe my build configuration is corrupted but I don't know how.
I tried to:
but nothing these steps does not fix the issue.
On device, I can't access to "Inspect device" tool of Chrome to see if I have JS problem.
Do you have any idea to resolve my problem please?
After more tests, I found the following behavior:
If I change the ID of
<widget id="new-app-id">
inconfig.xml
, app runs fine on device!
Any idea on this behavior?
Thanks!
To run your app, all you have to do is enable USB debugging and Developer Mode on your Android device, then run ionic cordova run android --device from the command line. Enabling USB debugging and Developer Mode can vary between devices, but is easy to look up with a Google search.
Developer Options & USB Debugging are enabled by default in the Android emulator. Open the Chrome browser and navigate to the URL chrome://inspect/#devices . Your connected Android device should show up in the list of Remote Targets. On your device, open the Ionic app that you would like to debug using Chrome.
We don't recommend using Android Studio for developing Ionic apps. Instead, it should only really be used to build and run your apps for the native Android platform and to manage the Android SDK and virtual devices.
After many tests and research, I found the root cause and can solve the issue.
Remove the plugin cordova-plugin-facebook4
and re-add it with SDK VERSION to 4.35.0
For older cordova-android
version, the version shall be defined as described here
So, run:
ionic cordova plugin remove cordova-plugin-facebook4
ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="<APP-ID>" --variable APP_NAME="<APP-NAME>" --variable ANDROID_SDK_VERSION="4.35.0"
As decribed in this post, Facebook SDK version 4.36.0 is not stable and causes the stuck in main thread.
This behavior is visible on my App (with "monitor tools" of Android SDK)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With