Launch上的Android Studio java.lang.NoClassDefFoundError

时间:2013-07-07 04:24:07

标签: android noclassdeffounderror android-studio launch build.gradle

我在build.gradle中添加了模块依赖项,显然Android Studio并没有抱怨,没有编译错误。但当我点击“运行”以启动应用程序时,我得到了java.lang.NoClassDefFoundError。

我正在使用Android Studio的Gradle。

我试过了: gradle clean + gradle assemble并成功构建,但在发布时仍然失败。

我的build.gradle

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.4'
    }
}
apply plugin: 'android'

repositories {
    mavenLocal()
    mavenCentral()
}

dependencies {
    compile files('libs/android-support-v4.jar')
    compile group:'com.deebl', name:'deebl-client-core', version:'0.0.1-SNAPSHOT'
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
}

例外:

07-07 14:03:23.833      790-790/com.deebl                  E/AndroidRuntime: FATAL EXCEPTION: main
    java.lang.NoClassDefFoundError: com.deebl.client.core.be.Movie
    at com.deebl.MainActivity.onCreate(MainActivity.java:15)
    at android.app.Activity.performCreate(Activity.java:5104)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
    at android.app.ActivityThread.access$600(ActivityThread.java:141)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:5041)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
    at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:0)

升级到Android Studio 0.2.0解决了它