3

my ionic project works fine with ionic serve --lab ,but while copied the.apk file in build folder to my phone and install the app but blank screen appears ,

Please can anyone suggest what might be my problem

my app is using google maps,key is provieded for both app and browser in index.html

4 Answers 4

1

Have you tried running it in the emulator ? Since its much easier to see the error logs . Try ionic emulate android -l or ios -l (whichever OS you are building for) and then once the execution starts run the command consolelogs it will log all the activity and you will have a better understanding about why its not working.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you very much for the reply i tried the emulator but my emulator does not install my .apk file cant't understand why?
Have you installed the whitelist plugin if not then run this ionic plugin add github.com/apache/cordova-plugin-whitelist.git And you can try this as well if that doesn't solve it cordova plugin remove com.ionic.keyboard cordova plugin add com.ionic.keyboard
@SudhakarRapeti it would be also helpful if you could share what was printed out in the logs when you ran ionic emulator
1

+1 for using Chrome Remote Debugging feature. It give you the same output as you would receive from running you app in the browser.

Additionally, I have found that sometimes if your app is already compiled, the ionic CLI doesnt always copy your current files into the APK, and uses the older cached files instead. If you are banging your head against the wall, run the following commands to make sure you have your latest code in your APK.

ionic platform remove android
ionic platform add android
ionic run android

1 Comment

Thank you. Should have expected that after tinkering with package.json, bower.json and cordova plugins :)
0

I suggest you use the Chrome Remote Debugging feature. I encountered the same, and looked for answers to my symptom for hours. Once I connected to the chrome remote debugger, I got the console.log back, and noticed there was a problem in my routing setup.

Comments

-1

It was a problem with ionic CLI. I've updated it to the latest and reinstalled all dependencies.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.