android-安装失败,因为未对APK进行签名

我刚刚将Android Studio从1.5升级到2.2,现在运行我的App时出现错误

Installation Failed since the APK was either not signed, or signed
incorrectly. If this is a Gradle-based project, then make sure the
signing configuration is specified in the Gradle build script.

我已经用谷歌搜索了,对我没有任何帮助,我的gradle文件是:

...
android {
    signingConfigs {
        myapp_signed {
            keyAlias 'mkey'
            keyPassword 'pwd'
            storeFile file('.../_keystore.jks')
            storePassword 'pwd'
        }
    }
    compileSdkVersion 22
    buildToolsversion "21.1.2"
    defaultConfig {
        applicationId '...'
        minSdkVersion 14
        targetSdkVersion 22
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
            signingConfig signingConfigs.myapp_signed
        }
    }
    productFlavors {
    }
}
...

有人知道如何解决这个问题吗?在我收到此错误之前,我又遇到了另一个错误,它是说:

Warning:Gradle version 2.10 is required. Current version is 2.2. If
using the gradle wrapper, try editing the distributionUrl in
C:\Users\blahblah\myproject\gradle\wrapper\gradle-wrapper.properties
to gradle-2.10-all.zip

我像这样解决“Gradle Version 2.10 is required.” Error

编辑:
即使我将构建变体切换回调试模式,也请卸载应用程序,然后重试,我会得到相同的错误.

解决方法:

对我来说,解决方案是,更新我使用的所有库并将其更新到Android 23.
也许这对某人有帮助.

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...