1

I recently generated Gradle build files for my Android application project in Eclipse for the sake of testing Android Studio. I went back to Eclipse and try to run my project. However, now none of my library JARs in the libs folder are being recognized. When I run, I instead get something like this in LogCat:

05-19 13:19:47.828: E/AndroidRuntime(31096): java.lang.NoClassDefFoundError: android.support.v4.app.TaskStackBuilder

Is there any way to get my JARs recognize again? I tried the solution found here, but to no avail.

Community
  • 1
  • 1
MowDownJoe
  • 728
  • 1
  • 11
  • 29

1 Answers1

2

It's a bug in ADT 22. Make sure to go in all your projects, and in the project properties, go in "Build Path", then in the "Order and Export" tab make sure both containers (dependencies and private libraries) are checked.

Xavier Ducrohet
  • 28,383
  • 5
  • 88
  • 64
  • I get it in Android Studio too. My build.gradle has compile files('libs/android-support-v4.jar', 'libs/gson-2.2.4.jar'). It builds successfully but when I run the app, I get java.lang.NoClassDefFoundError: com.google.gson.Gson. – dannyroa May 26 '13 at 18:39
  • 2
    I had the same problem. Go to your command line, navigate to your project root and execute ./gradlew clean Check: http://stackoverflow.com/questions/16182957/exception-java-lang-noclassdeffounderror-com-google-android-gms-common-accountp – marbdq Jun 03 '13 at 14:02