Hi,
I am trying to get the EMDK up and running with Android Studio 1.1.0 on mac os x.
I've been following this guide:
Developing EMDK Apps With Android Studio 1.0.x
I managed to get the addon-symbol-emdk_v3.0_API-16 (and 19) folders out of the windows installers for ADT.
In Android Studio i include the com.symbol.emdk.jar in my libs folder.
I also tried it another way by using the EMDK sdk as target sdk: "Symbol Technologies, Inc.:EMDK 3.0 (API 16):16"
Both give the same result:
java.lang.RuntimeException: stub when i access a method from the EMDK.
On the MC40 that i am testing on, the EmdkOSUpdateApp_v3.0.4.apk installer was run. In the filebrowser i can see /system/framework/com.symbol.emdk.jar
Any ideas on how to get the EMDK working?
Thanks
Bert
Android Studio java.lang.RuntimeException: stub// Expert user has replied. |
4 Replies
Using "provided" in the dependencies did the trick.
On the other hand, i also needed to add some permissions and libraries in the manifest:
and in your
Sure,
the usual EMDK application requirements are still there, doesn't matter if you're using Android Studio or Ecliplse+ADT.
You can use the tutorials in the EMDK section of Launchpad to see how to build an app:
~Pietro
You don't want the com.symbol.emdk.jar file exported with your application, I'm not too sure how to do it in Android Studio but in Eclipse under Java Build Path it would be a reference library but not exported with the application (Project Properties -> Java Build Path -> Order and Export -> EMDK is unchecked). By not exporting the .jar you'll reference the .jar you've installed previously on the device that you referenced at /system/framework.
Hi Bert,
what I usually do is to copy the com.symbol.emdk.jar into the lib folder and update the app.gradle file so that the jar package is seen by the tools but not included in the build:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'], exclude: ['com.symbol.emdk.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
provided files('./libs/com.symbol.emdk.jar')
}
Usually this works for me, is not currently supported.
We're working to release official support for OS X Android Studio shortly.
~Pietro