Reputation: 1029
I've built a simple java console app that prints "Hello World", and I'm trying to make it's .class/.jar bytecode run in an Android emulator (Nox). For that, I've transfered the .jar and .class files from the app to the emulator via Google Drive, and tried to use two java emulating Android apps so far: Java Manager and J2ME Loader.
In Java Manager, I got the following error while trying to run the .class file:
Failed to dexing Class
And in J2ME I got the following error while tring to run the .jar file:
Broken manifest
Does anyone has any idea of how to fix those errors in any of those two java emulators for Android? I'm not finding another app in Play Store.
Upvotes: 0
Views: 1109
Reputation: 42744
Android can neither execute Java (J2SE class files) nor J2ME code. It has it's own format which bases on Java, however the compiler infrastructure is different from J2SE. There may be emulators allowing to execute J2SE or J2ME code, however I would not rely on such products as the support is usually incomplete.
Therefore you need the Android SDK (and/or the development IDE "Android Studio") for creating Android Apps. When you have created an Android App (apk file) you can deploy and run it an and Android device or the emulator you have mentioned.
Upvotes: 1