When I run “ionic capacitor run android -l --host=192.168.1.14” command, it shows up the standalone emulator without opening Android Studio and the app runs without issues.
The issue comes when trying to run the app in Android Studio emulator, using the same device as with the command above (Pixel 3 Api 30). The app shows up the splash screen and then goes white.
The generated apk from Android Studio when installed in my smartphone shows white screen aswell.
Could it be a misconfiguration of Android Studio or the android project generated by Capacitor?
And the APK generated in Android Studio shows blank screen…
I really need the APK for testing purposes ;/
Another thing Im worried about is this warning when Gradle builds the app for the emulator:
[capacitor] [warn] @capacitor/core@3.7.0 version doesn't match @capacitor/android@3.5.1 version.
[capacitor] Consider updating to a matching version, e.g. w/ npm install @capacitor/core@3.5.1
You definitely should keep your core version inline with the android/iOS packages that go along side it. Something like npm i -E @capacitor/{core,android,ios}@3 should align everything to the latest v3 release for you.
White screen errors are typically caused by JS errors that prevent the webview from completing the initial load. You should be able to attach a chrome debug window to it and see if there are any logs. My go to check is:
Load the app and get white screen
Attach debugger chrome://inspect
Reload webview from debugger with window.location.reload()
See if any errors are present
Hopefully that will surface any potential errors that might be blocking you!
Thanks again for the tips but the thing stills the same. I did the steps you suggested but when my webview reloads, devtools terminal is empty, no messages at all, that means I can’t debug anything.
We are thinking on hire somebody to help us get out of this blocking issue. I hear offers, no joke here, pm please.
After several attempts I am still stuck on this problem. The last thing I have tried is to connect to the APP from the Android emulator webviewer, with which I have managed to see some debug messages in Chrome.
The following warnings are appearing when loading the first screen of the APP, just after the Capacitor logo appears:
I finally solved this problem. I’ll explain what I did:
Created a new Ionic + Vue project
Copied the source code from my current project to the new one
Installed the dependencies
In my particular case, I realized that @capacitor/storage is deprecated in favor of @capacitor/dependencies, so I updated the package and made the necessary code changes.
Build and test
Finally say that I have not been able to know exactly what the error was, I did not get any message when debugging the app.