The problem is, its really tough to diagnose and narrow down a problem if there’s three separate issues intermingled in one report. I’m fixing the Fire issue, then i’ll look at the rest. Please retest with Fire and let me know what (if any) errors you get now, when .2116 is up (in ~30m or so).
Just to help to clarify the independent problems:
1 .- This last one about Fire not finding jar files.
2 .- The UI designer is not shown in Android Studio 2.3 and above, when you use “Edit UI files in Android Studio”
3.- VS 2015 trying to build Android Apps with recent SDKs: RemObjects.Elements.Cooper.Android.targets(285,3): error : Error: no se ha encontrado o cargado la clase principal com.android.sdklib.build.ApkBuilderMain
4.- Problems with AVDs + Debugging. I’ve not reported this in detail because I want to wait to be able to build without touching the SDK’s tools folder.
I can separate them in different posts if you want.
1: should be fixed with .2116 going up now (eta 10 minutes
2: i believe i can reproduce this: i see this: http://share.dwarfland.com/jVp8, do you see the same message?
3: i can’t/won’t test VS2015 until Monday (because life’s too short for Windows on the weekend ;). in Fire, i have no problems building my own Android app, against 25 and with ADS 2.3 installed. I’d appreciate if you could (a) let me know if this issue also shows in Fire, for you, once 1 is fixed and (b) send me your test project and a complete build log from VS (if it does not) or from Fire (if it does).
4: i’d appreciate more details on this.
Yes, but I think there is more. At some point, somehow, that message wasn’t showing, but still the Designer tab was missing.
I’ve also realized that the res folder is not marked as the “resources folder” in the project structure editor.
Fair enough
My test project is just an empty Android Application, as you get it from the template. So If you can build in fire, I suppose it only happens on windows.
I’ve seen Android Studio doesn’t fully install the SDK until the first time it try to use it. I mean, It’s zipped somewhere and the it unzips it. Another thing I found is if you have JDK 1.7 + JDK 1.8 in the same machine it doesn’t like it. But this may be not related to that message. I’ve got rid of that message (on Windows), by manually editing the SDK in Platform Settings->SDKs but the UI designer was still missing.
Having said that, one “good” news. I see the same problem building in Fire, so it’s not windows only:
Run: “/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java” -Xmx1024M -classpath “” com.android.sdklib.build.ApkBuilderMain “obj/Debug/Android/org.me.org.me.androidapplication2_unaligned.apk” -z “/Users/jasl/Documents/org.me.androidapplication2/obj/Debug/Android/org.me.org.me.androidapplication2_unsigned.apk” -v -rj “/Applications/Fire.app/Contents/Resources/References/Cooper/cooper.jar” -rj “/Applications/Fire.app/Contents/Resources/References/Cooper/elements.jar”
/Applications/Fire.app/Contents/Resources/XbuildTargets/RemObjects Software/Elements/RemObjects.Elements.Cooper.Android.targets: error : Error: no se ha encontrado o cargado la clase principal com.android.sdklib.build.ApkBuilderMain
Task “AndroidPack” execution – FAILED
Done building target “CooperAndroidAfterCompile” in project “/Users/jasl/Documents/org.me.androidapplication2/org.me.androidapplication2.elements”.-- FAILED
Done building project “/Users/jasl/Documents/org.me.androidapplication2/org.me.androidapplication2.elements”.-- FAILED
Task “MSBuild” execution – FAILED
Done building target “Build” in project “/var/folders/6y/66zx10vj6lx7lvv4sx_1c8wh0000gn/T/org.me.androidapplication2.fire.temp.sln”.-- FAILED
Done building project “/var/folders/6y/66zx10vj6lx7lvv4sx_1c8wh0000gn/T/org.me.androidapplication2.fire.temp.sln”.-- FAILED
/Applications/Fire.app/Contents/Resources/XbuildTargets/RemObjects Software/Elements/RemObjects.Elements.Cooper.Android.targets: error : Error: no se ha encontrado o cargado la clase principal com.android.sdklib.build.ApkBuilderMain
I’ve just tried to edit the UI in Fire. I don’t see the “Android SDK is not configured…” message here. It looks fine.
I haven’t touched anything here in Platform Settings, It just fine after the first install. But still the designer is missing.
I’ve found where the problem (4) could be. There is no sdk/tools/lib/sdklib.jar now.
I see sdklib-25.3.0.jar and sdk-common-25.3.0.jar in that folder. apkbuilder is inside sdklib-25.3.0.jar.
I guess the same kind of problem could be affecting to the UI designer (3). There is a bunch of jar files with the 25.3.0 termination. Note the is no previous version of the files, even having older api levels installed. I have 25.3, 23.3 and 15.5 installed as platforms.
It’s curious, i’m running tools 25.0.1 and com.android.sdklib.build.ApkBuilderMain runs just fine for me… Claudio’s log has him using 25.0.0 and failing. Updated to 25.0.2 now, and it’s still fine… This is on Mac, didn’t test Windows.
Maybe when you update from older SDKs, the sdklib.jar is preserved. I’d try to delete the SDK folder and reinstall Android Studio 2.3 + its SDK. With the fresh SDK installed you shouldn’t have a sdklib.jar there, instead you should have something like sdklib-25.3.0.jar
So i take it sdklib.jar *does not * exist for you guys, only sdklib-25.0.3-dev.jar?
curiously, that does not just seem to be a new/renamed version of that library; it does not actually work if i use that one instead of sdklib.jar:
Floorshow:~ mh $ "/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/bin/java" -Xmx1024M -classpath "/Users/mh/Library/Android/sdk/tools/lib/sdklib-25.3.0-dev.jar" com.android.sdklib.build.ApkBuilderMain "obj/Debug/Android/com.remobjects.com.remobjects.androidapplication20_unaligned.apk" -z "/Users/mh/Test Projects/com.remobjects.androidapplication20/obj/Debug/Android/com.remobjects.com.remobjects.androidapplication20_unsigned.apk" -v -rj "/Users/mh/Code/Elements/Bin/References/Cooper/swift.jar" -rj "/Users/mh/Code/Elements/Bin/References/Cooper/cooper.jar"
THIS TOOL IS DEPRECATED. See --help for more information.
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/prefs/AndroidLocation
at com.android.sdklib.internal.build.DebugKeyProvider.getDefaultKeyStoreOsPath(DebugKeyProvider.java:122)
at com.android.sdklib.build.ApkBuilder.getDebugKeystore(ApkBuilder.java:944)
at com.android.sdklib.build.ApkBuilderMain.main(ApkBuilderMain.java:129)
Caused by: java.lang.ClassNotFoundException: com.android.prefs.AndroidLocation
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
Does manually running that command line (copy the actual command from your go and just adjust the file name to add -25.0.3-dev) work for you guys?
Yes and no, sdklib.jar does not exist for me. But I don’t have sdklib-25.0.3-dev.jar,
mine is sdklib-25.3.0.jar
If I run the command I get the same as you:
THIS TOOL IS DEPRECATED. See --help for more information.
Exception in thread “main” java.lang.NoClassDefFoundError: com/android/prefs/AndroidLocation
at com.android.sdklib.internal.build.DebugKeyProvider.getDefaultKeyStoreOsPath(DebugKeyProvider.java:122)
at com.android.sdklib.build.ApkBuilder.getDebugKeystore(ApkBuilder.java:944)
at com.android.sdklib.build.ApkBuilderMain.main(ApkBuilderMain.java:129)
Caused by: java.lang.ClassNotFoundException: com.android.prefs.AndroidLocation
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 3 more
THIS TOOL IS DEPRECATED and may stop working at any time!
If you wish to use apkbuilder for a custom build system, please look at the
com.android.sdklib.build.ApkBuilder which provides support for
recent build improvements including library projects.
A command line tool to package an Android application from various sources.
Usage: apkbuilder [-v][-u][-storetype STORE_TYPE] [-z inputzip]
[-f inputfile] [-rf input-folder] [-rj -input-path]
-v Verbose.
-d Debug Mode: Includes debug files in the APK file.
-u Creates an unsigned package.
-storetype Forces the KeyStore type. If omitted the default is used.
-z Followed by the path to a zip archive.
Adds the content of the application package.
-f Followed by the path to a file.
Adds the file to the application package.
-rf Followed by the path to a source folder.
Adds the java resources found in that folder to the application
package, while keeping their path relative to the source folder.
-rj Followed by the path to a jar file or a folder containing
jar files.
Adds the java resources found in the jar file(s) to the application
package.
-nf Followed by the root folder containing native libraries to
include in the application package.
THIS TOOL IS DEPRECATED. See --help for more information.
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/prefs/AndroidLocation
at com.android.sdklib.internal.build.DebugKeyProvider.getDefaultKeyStoreOsPath(DebugKeyProvider.java:122)
at com.android.sdklib.build.ApkBuilder.getDebugKeystore(ApkBuilder.java:944)
at com.android.sdklib.build.ApkBuilderMain.main(ApkBuilderMain.java:129)
Caused by: java.lang.ClassNotFoundException: com.android.prefs.AndroidLocation
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more
Ok, great. we’re getting somewhere. It looks like they just have finally gone ahead and totally broke this tool, as promised. I’m seeing the same as you with a delete and fresh SDK install of only 2.5 We’ll work on a solution (compromise for tomorrow beta, as this might be more work, definitely for next week).
thanx for bringing this to our attention, because i’d never have noticed that myself, having the left over old jar ion place :(.