I have an app working inside the browser and on iOS simulator.
On an Android device it just displays the back button (really <{{‘back’ | translate}} as I am using angular-translate).
It seems as there is a Javascript error preventing Angular to work: how can I debug it on the device?
I have tried removing and adding the platform, upgraded node, ionic, cordova, recreating the project from zero, but nothing: today it doesn’t work on Android.
install android driver for your device on your pc --> connect the device with your computer -> start google chrome -> go to Settings -> tools -> device debugging (or something like that^^)
There you will see your connected device if it installed.
Thank you,
I see that the app works with an Android 4.0. Until yesterday it worked on an old 2.3 too. Unfortunately 2.3 doesn’t support the remote debugging…
It’s strange that my project stopped working on Android 2.3 yesterday. I just worked on Angular code so I don’t think I did something bound to the platform, unless there’s something in the new version of Ionic which prevents Android 2.3 from working (yes, I know that the support is for Android >4).
Since you’re working with a lot of javascripts, if you have a unix shell, just type
"adb logcat CordovaLog:D \*:S"
this will give you the log console like it appears in the browsers.
@brauliobo
thanks for the quick reply. I still can’t get it working…
I’m getting app not defined. I change the name to starter (which is the name of the project) and same error.
And yes, I did include the settings.js file before the Weinre debugging script
That helped me, thx.
However I altered your command to:
adb -s <DEVICEID> logcat CordovaLog:D *:S
‘-s’ addresses a specific device if you have multiple devices connected to your computer (find the id with ‘adb devices’).
Also I had to remove the ‘’ from ‘\*:S’ because there was a lot of non cordova related output in the console, like signal strength. Without that backslash only the cordova output appears just like when testing your app in a desktop browser.
I am coming from eclipse to trying this command line ionic stuff and its really handy to set up your java sdks tools in your path. Using with genymotion virtual device set up to debug with your java SDK, it works really well. just open console and type monitor to get that familiar eclipse debugging environment.