# Android: Class not found

**URL:** <https://forum.ionicframework.com/t/android-class-not-found/28906>\
**Category:** uncategorized\
**Created:** [July 22, 2015, 2:56am UTC](https://forum.ionicframework.com/t/android-class-not-found/28906 "2015-07-22T02:56:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elduderino15](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/elduderino15/32/105188_2.png) [@elduderino15](https://forum.ionicframework.com/u/elduderino15)\
**Post date:** [July 22, 2015, 2:56am UTC](https://forum.ionicframework.com/t/android-class-not-found/28906/1 "2015-07-22T02:56:23Z")

</div>

After I successfully developing and testing my app on iOS, I now moved to the Android sim, but am getting class not found errors. How can I fix the dependencies? I have deleted and re-added the platform/android folder many times…

Here’s my error:

```
D/PluginManager( 1542): init()
W/System.err( 1542): java.lang.ClassNotFoundException: org.apache.cordova.device.Device
W/System.err( 1542): at java.lang.Class.classForName(Native Method)
W/System.err( 1542): at java.lang.Class.forName(Class.java:251)
W/System.err( 1542): at java.lang.Class.forName(Class.java:216)
W/System.err( 1542): at org.apache.cordova.PluginEntry.getClassByName(PluginEntry.java:117)
W/System.err( 1542): at org.apache.cordova.PluginEntry.createPlugin(PluginEntry.java:93)
W/System.err( 1542): at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:195)
W/System.err( 1542): at org.apache.cordova.PluginManager.init(PluginManager.java:106)
W/System.err( 1542): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:457)
W/System.err( 1542): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:444)
W/System.err( 1542): at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:414)
W/System.err( 1542): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:395)
W/System.err( 1542): at com.ionicframework.buyo219524.Buyo.onCreate(Buyo.java:33)
W/System.err( 1542): at android.app.Activity.performCreate(Activity.java:5231)
W/System.err( 1542): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
W/System.err( 1542): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
W/System.err( 1542): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
W/System.err( 1542): at android.app.ActivityThread.access$800(ActivityThread.java:135)
W/System.err( 1542): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
W/System.err( 1542): at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 1542): at android.os.Looper.loop(Looper.java:136)
W/System.err( 1542): at android.app.ActivityThread.main(ActivityThread.java:5017)
W/System.err( 1542): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 1542): at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err( 1542): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
W/System.err( 1542): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
W/System.err( 1542): at dalvik.system.NativeStart.main(Native Method)
W/System.err( 1542): Caused by: java.lang.NoClassDefFoundError: org/apache/cordova/device/Device
W/System.err( 1542): ... 26 more
W/System.err( 1542): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.cordova.device.Device" on path: DexPathList[[zip file "/data/app/com.ionicframework.buyo219524-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.ionicframework.buyo219524-2, /system/lib]]
W/System.err( 1542): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
W/System.err( 1542): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
W/System.err( 1542): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
W/System.err( 1542): ... 26 more
I/System.out( 1542): Error adding plugin org.apache.cordova.device.Device.
W/System.err( 1542): java.lang.ClassNotFoundException: com.ionic.keyboard.IonicKeyboard
W/System.err( 1542): at java.lang.Class.classForName(Native Method)
W/System.err( 1542): at java.lang.Class.forName(Class.java:251)
W/System.err( 1542): at java.lang.Class.forName(Class.java:216)
W/System.err( 1542): at org.apache.cordova.PluginEntry.getClassByName(PluginEntry.java:117)
W/System.err( 1542): at org.apache.cordova.PluginEntry.createPlugin(PluginEntry.java:93)
W/System.err( 1542): at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:195)
W/System.err( 1542): at org.apache.cordova.PluginManager.init(PluginManager.java:106)
W/System.err( 1542): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:457)
W/System.err( 1542): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:444)
W/System.err( 1542): at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:414)
W/System.err( 1542): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:395)
W/System.err( 1542): at com.ionicframework.buyo219524.Buyo.onCreate(Buyo.java:33)
W/System.err( 1542): at android.app.Activity.performCreate(Activity.java:5231)
W/System.err( 1542): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
W/System.err( 1542): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
W/System.err( 1542): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
W/System.err( 1542): at android.app.ActivityThread.access$800(ActivityThread.java:135)
W/System.err( 1542): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
W/System.err( 1542): at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 1542): at android.os.Looper.loop(Looper.java:136)
W/System.err( 1542): at android.app.ActivityThread.main(ActivityThread.java:5017)
W/System.err( 1542): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 1542): at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err( 1542): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
W/System.err( 1542): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
W/System.err( 1542): at dalvik.system.NativeStart.main(Native Method)
W/System.err( 1542): Caused by: java.lang.NoClassDefFoundError: com/ionic/keyboard/IonicKeyboard
W/System.err( 1542): ... 26 more
W/System.err( 1542): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ionic.keyboard.IonicKeyboard" on path: DexPathList[[zip file "/data/app/com.ionicframework.buyo219524-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.ionicframework.buyo219524-2, /system/lib]]
W/System.err( 1542): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
W/System.err( 1542): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
W/System.err( 1542): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 23, 2015, 7:36pm UTC](https://forum.ionicframework.com/t/android-class-not-found/28906/2 "2015-07-23T19:36:13Z")

</div>

Does the app still work?  
It may just be an issue with a plugin rather than an issue with your app.

---

<div class="post-metadata">

**Author:** ![elduderino15](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/elduderino15/32/105188_2.png) [@elduderino15](https://forum.ionicframework.com/u/elduderino15)\
**Post date:** [July 23, 2015, 11:54pm UTC](https://forum.ionicframework.com/t/android-class-not-found/28906/3 "2015-07-23T23:54:04Z")

</div>

I think it depends on the installation. On the first computer, it gives me the error. On another I did a fresh Android installation an it runs there now.

However, it does not work. It might be some CORS issue + I am using LeafletJS .  
How can I really step-by-step debug the Android emulator? I like the Safari feature where you can hook into iOS. Does something similar exist?

Thanks,  
EL

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 27, 2015, 12:54pm UTC](https://forum.ionicframework.com/t/android-class-not-found/28906/4 "2015-07-27T12:54:28Z")

</div>

Yes, if you’re targeting android 4.4+, you can use chrome to debug the app.
