When I am trying to run app on android device using ionic run android, it is showing the build and launch as successful.
On device, it is showing
app_name stopped working
I searched a lot and tried installing plugins again, not working. I'm not using ionic-keyboard plugin. Any help would be appreciated.
UPDATE: When I'm using ionic serve --lab, it is showing perfectly on browser with some of the plugins not working because browser doesn't support all the cordova plugins. That's fine.
ionic platform add android shows at the end
saving platform to package.json file
believe something to do with ionic-keyboard. can you try installing keyboard plugin once and checking the app if it works or not. Thus we will have some RCA.
Can't run Ionic on Android: class not found exception IonicKeyboard
Related
I just started Learnig Ionic and after a successful deploy of myapp (generate apk and install in my phone), i still get a web page error on my android device 'Could not connect to server (http://localhost:8080/)'
I believe the app should be offline because i haven't used any web service. check out the error here
The url http://localhost:8080/ would only work on the emulator but not on an actual android device.
Find the method webview.loadUrl() most likely on the MainActivity.java and change to something like webview.loadurl("file:///android_asset/www/index.html") instead of webview.loadurl("http://localhost:8080/");
Your app is offline.
A plugin that all Ionic apps have been using for ages, cordova-plugin-ionic-webview, released a new version 2.x on July 23rd 2018. This added a webserver into the Android app that is used to deliver your app files to the webview displaying your app. It runs on localhost:8080.
Unfortunately version 2 of cordova-plugin-ionic-webview does not support Android 4.x any more which you seem to be using. This is the eason why you are getting that error message.
You can probably fix your problem by downgrading to the last version of the plugin that supported Android 4.x:
ionic cordova plugin add cordova-plugin-ionic-webview#1.2.1
More elaborate information and alternative solutions:
https://ionic.zone/debug/ionic-and-android-4
Upon running the Ionic Android Emulator, my application appears as expected (although very zoomed in, a separate issue). However, when I try to click a button within the app, there is no response (for example, all that appears is the app's homepage and I cannot click anything to move on to sign-in page).
I've run a template ionic app on the same emulator and it works perfectly, so there must be something wrong with my app itself. However, when I run 'ionic serve' so that the app appears in my browser, all functionality is available.
Does anyone have any suggestions of how to approach this issue? Thank you in advance.
UPDATE:
Fixed it! fixed it! i ran ionic emulate android --livereload --consolelogs --serverlogs1, which suggested that i run ionic plugin add cordova-plugin-statusbar, and it's been fixed!
Answering my own question in case others come across this issue in the future:
Run:
ionic emulate android --livereload --consolelogs --serverlogs1
Which will prompt you to run:
ionic plugin add cordova-plugin-statusbar
I put admob into my ionic app. It works fine for ios, but I keep on getting "admob is not defined" error for android and see no ads when I run it on an android phone.
I added and removed the cordova plugin a few times: ionic plugin add cordova-plugin-admobpro
I also added and removed and readded the android platform from the app, didn't work.
I also added and removed: cordova plugin add com.google.playservices, didn't change
The other problem is once I take all the admob stuff out of my code and completely uninstall the plugin, it causes (I am using parse server) parse initialize issues in the same locations as the admob issues in the error below, and the android does infinite loading, the ios app works fine.
Any ideas please? I've been stuck on this for a bit.
I'm building an app for Android with Ionic/Cordova. The app works fine in the emulator and works fine in the Ionic view app.
The app connects to an API in our internal network and everything works fine.
The problem is, when I build the cordova app to Android and install the apk, it doesn't connect to the internet. I can't seem to find what the problem is and why it is not connecting, even though it does work in the emulator and Ionic view.
Does anyone know what the problem would be and why it doesn't work?
It seems I had to install the Ionic whitelist plugin: http://docs.ionic.io/docs/cordova-whitelist
Now it is working! Thanks for your help guys
This plugin saved my time:
cordova plugin add cordova-plugin-whitelist
I'm making my first steps in phonegap. I've been able to set up a project, install a plugin and build the app on my phone without errors. However, now, when I try to change the layout of my www/index.html in the project's root platforms/android/assets/www/index.html stays untouched whenever I (re)build the app.
I'm basically working in eclipse, only for html and javascript I use sublime. I've searched now for a couple of hours for a solution. The most promising approach was this thread: Changes to HTML files not showing on built phonegap 3.0 app ... but even that didn't work.
What can I have done wrong? There's no error, no warning (none resulting from the build process) and I don't know how I could debug the issue. I'm currently using phonegap/cordova 4.2.0
Any clue? Thanks
I still don't know the reason for my problem. However, installing the app via cordova CLI rather than eclipse seems to have solved the problem:
$ cordova prepare android
$ cordova run android