AndroidStudio 0.8.2运行应用程序或调试应用程序失败

时间:2014-07-15 14:12:28

标签: android debugging android-studio apk

我使用向导生成了带导航抽屉的应用程序。

当我选择Run'App'或Debug'App'时,我收到此错误:

app-release-unsigned.apk is not signed. Please configure the signing information for the selected flavor using the Project Structure dialog

Generate Signed APK ...选项有效,它可以创建已签名的应用程序,可以安装在手机上并运行。 还可以在调试或发布时制作或重建项目,而不会出错。

我已在项目结构中配置了签名信息,但我得到了同样的错误。此外,我有另一个较旧的应用程序运行或调试没有此错误并具有相同的gradle.build,除了最后一个针对sdk 20

这是我的build.gradle文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion '20.0.0'
    defaultConfig {
        applicationId "com.mydomain.myapp"
        minSdkVersion 15
        targetSdkVersion 20
        versionCode 7
        versionName "1.06"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    // You must install or update the Support Repository through the SDK manager to use this dependency.
    compile 'com.android.support:support-v4:20.+'
    compile files('libs/android-query-full.0.26.8.jar')
    compile files('libs/AppRate_1.1.jar')
    compile files('libs/gallery-lib.jar')
    compile files('libs/GoogleAdMobAdsSdk-6.4.1.jar')
    compile files('libs/libGoogleAnalyticsServices.jar')
    compile files('libs/sqliteassethelper-2.0.1.jar')
    compile files('libs/universal-image-loader.jar')
}

  • 让项目有效。
  • 重建项目。
  • 生成签名APK有效。
  • 运行'App'失败
  • 调试'应用'失败

1 个答案:

答案 0 :(得分:7)

我今天遇到了同样的问题

- 关闭项目并再次导入。

相关问题