Eclipse adt 17 and libs folder

So i update eclipse adt to version 17 and i get this error

04-05 12:28:55.810: E/AndroidRuntime(5470): FATAL EXCEPTION: main
04-05 12:28:55.810: E/AndroidRuntime(5470): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.galeola.agentis/com.galeola.agentis.activity.GestionaleActivity}: java.lang.ClassNotFoundException: com.galeola.agentis.activity.GestionaleActivity in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.galeola.agentis-1.apk]
04-05 12:28:55.810: E/AndroidRuntime(5470):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1742)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at android.app.ActivityThread.access$500(ActivityThread.java:122)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1027)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at android.os.Looper.loop(Looper.java:132)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at android.app.ActivityThread.main(ActivityThread.java:4126)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at java.lang.reflect.Method.invokeNative(Native Method)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at java.lang.reflect.Method.invoke(Method.java:491)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at dalvik.system.NativeStart.main(Native Method)
04-05 12:28:55.810: E/AndroidRuntime(5470): Caused by: java.lang.ClassNotFoundException: com.galeola.agentis.activity.GestionaleActivity in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.galeola.agentis-1.apk]
04-05 12:28:55.810: E/AndroidRuntime(5470):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:251)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at java.lang.ClassLoader.loadClass(ClassLoader.java:540)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at java.lang.ClassLoader.loadClass(ClassLoader.java:500)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at android.app.Instrumentation.newActivity(Instrumentation.java:1022)
04-05 12:28:55.810: E/AndroidRuntime(5470):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1733)
04-05 12:28:55.810: E/AndroidRuntime(5470):     ... 11 more

      

however, if I move my libraries to / libs I can run applications, but with libraries in / libs, javadoc and javasources stops working, and if they are not in / libs, javadoc and javasource work, so I don't understand why.

+3


source to share


5 answers


Ok so this is a bug and the solution is comment # 8 http://code.google.com/p/android/issues/detail?id=27490#c8



0


source


Take a look at Xavier Ducrohet to answer here . But basically, with adt17, you cannot bind Javadoc to your dependencies.



+1


source


For non library projects :

As mentioned in original question 8 in this issue on Android, build, runtime and javadoc issues have been fixed, albeit with kludge.

Unfortunately Ant builds don't work. To fix Ant builds that use Proguard, move the jars to lib as described in comment 8 and add ant.properties:

jar.libs.dir=lib

      

and proguard.cfg add:

-injars lib

      

The second addition is needed to troubleshoot runtime crashes.

I have not tested this for projects that use toolbox or emma tasks, but it looks like for non-library projects you need to build both Eclipse and Ant.

+1


source


Perhaps the ADK update messed up with your project build path. Try to remove the JAR and add it to your folder again libs

, add it to your build path and run a clean project.

check my question once - New question for Android SDK 17

0


source


Ok, after a few hours of research, I found a simple solution.

  • Click on your Android project
  • Select "Properties"
  • Select Java Build
  • Path selection and path export
  • Check all your links

That's all!

0


source







All Articles