1

I successfully build the ionic-material demo Ionic-material Demo

when I do ionic server the browser opens and the app works as excpected but when compiled on android

ionic platform add android
ionic build android
ionic run android

the app compiled and run but I'm not able to show diffrent screens on navigate the url changes and the floting action buttons show up but not te template files ?
what I'm doing wrong or what might be the problem ??
I added alert("debug") in the controller and the alert is showing up on navigation so just the template not rendering
note ionic is built over AngulaJs so Angular experts can help too
any help appreciated

Community
  • 1
  • 1
Diaa Saada
  • 1,026
  • 1
  • 12
  • 22

1 Answers1

0

Steps i'd take to debug this are:

  1. run ionic serve, and check the console for angularJS errors and resolve any if there are any

  2. run - ionic platform add android + ionic run android with a connected android device and from another console window run the following command to run logcat via ADB

    adb logcat CordovaActivity:V CordovaWebView:V CordovaWebViewClient:V IceCreamCordovaWebViewClient:V CordovaLog:V *:S

  3. Resolve any errors the ADB flags

  4. Try ionic platform add android + ionic run android again

Note: ionic handles touch events in browser and on device so this will not be the issue, it is likely it is a syntax error that has stopped the compile to device

sman0307
  • 198
  • 1
  • 9
  • i open the URLon my android device native browser and i got the same behavior the only thing touch do is showing the ripple effect so it is not android issue any clue ?? – Diaa Saada Aug 23 '15 at 09:31
  • the `ionic-serve` command is supposed to be ran from the browser of the machine you are developing on, usually `localhost:8100` and is for debugging purposes - it will not deploy your app to your phone – sman0307 Aug 24 '15 at 09:37
  • no I'm not . I used ionic serve --address 192.168.1.133 which allow browsers on ios and other PCs on the same network to run the app i'm only facing this problem on android browsers and when I compiled it to APK – Diaa Saada Aug 24 '15 at 10:04
  • 1
    Are you getting any errors showing in ADB Logcat after deploying and running the application? – sman0307 Aug 24 '15 at 13:06
  • yes found the errors
    TypeError: Object # has no method 'remove' at Scope.$scope.clearFabs (file:///android_asset/www/js/controllers.js:85:21) at new (file:///android_asset/www/js/controllers.js:120:20)
    Iremoved this line andd it works $scope.$parent.clearFabs()
    – Diaa Saada Aug 29 '15 at 07:30