The last few days the SDK was using Android studio to automatically update the Gradler after it opened Androidstudio yesterday and then failed and then Androidstudio hung up. is to use the previous method Eclipse everywhere jar package, finally encountered a strange problem, in this record, hope can help to meet the same error of small partners.
1, I randomly created an Android project under Eclipse, first using the Classes.jar under the E:\Unity 4.6\editor\data\playbackengines\androidplayer\release\bin.
2, simply write a function for unity to call.
3, compile and export the jar package.
4, import the jar into Unity's plugins/android.
5, export APK real machine test, OK.
Because I have a Unity5.2.3. So by the way also tested the next, the same procedure, under the Unity5.2.3 package but reported this error: "Unable to convert classes into DEX format. See the Console for details. Experienced people know that Classes.jar is repeating. Export jar package and the former exactly the same ah, do not know why this error, ask the degree niang, sure enough someone met. Http://forum.china.unity3d.com/thread-5434-1-1.html has a solution, exporting a jar package is just two options.
Copy the exported jar and Libs,res folder to Unity's Android under Pack test:
OK, to this test passed, hope to bring you help!
Eclipse Export JAR Package Unity Packaging Error