ionic 3: black screen with Android App on device

本秂侑毒 提交于 2019-11-30 14:36:38

After many tests and research, I found the root cause and can solve the issue.

Solution

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"

Root cause

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)

The reason is some application with your previous app-id(package name) is already installed on your device. Uninstall that application and try with your previous app-id and it should work.

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