Unfortunaly, the JDK from Oracle and the Android SDK Manager are not part of a single coordinated install and getting them to work together can be frustrating sometimes.
Until now, dot42 required the Android SDK Manager if you wanted to download and import packages such as Google Play Services.
The SDK Manager, in turn, requires the JDK from Oracle. My experience with identifying the appropriate JDK version on the Oracle site and installing it is far from painless.
After it has been installed, getting the Android SDK manager to run properly is the next hurdle. On different machines I discovered that I had to either Run as administator. Or if that didn't work, I had to run the android.bat batch from the Android SDK tools folder instead, or I had to tune my PATH environment variable. I have also found myself uninstalling and installing different versions and editions of the JDK just to see what combination would work. The high number of up votes of related questions and answers on StackOverflow is testimony to this problem.
For the purpose of dot42, this effort seems unproportional high given the minor role of the Android SDK manager and especially that of the JDK (we don't use it to parse or generate Java - we do that ourselves).
So, as of 1.0.0.70, we have decided to do offline imports of libraries such as Google Play Services and the Android Support Library and bundle them as DLLs with dot42. You import them by just checking them in the New Project Wizard:
Note that these DLLs are just wrappers to bind with C#. At runtime, your APK will call directly into the corresponding APK or use the original Java code compiled to DEX.
We consider this a first step towards making dot42 more self-contained and realize that there may still be occasions where you need the Android SDK Manager. But we strive to remove this requirement if possible.
No comments:
Post a Comment