android INSTALL_PARSE_FAILED_NO_CERTIFICATES

问题描述 : android studio 打开一项目 在A 手机上可以RUN AS , 无错误, 但是到B 设备(android平板)上 出现 

Session 'usbSerialExamples': Installation did not succeed. The application could not be installed: INSTALL_PARSE_FAILED_NO_CERTIFICATES  Retry

The application could not be installed: INSTALL_PARSE_FAILED_NO_CERTIFICATES APK signature verification failed.

 

 

解决办法:1 把项目生成签名文件,build signed apk 选择 V1 ,

                  2 app.gradle 中 添加下面内容   加这么些也没用   主要添加一个  v2SigningEnabled false

dexOptions {
    javaMaxHeapSize "4g"
    preDexLibraries = false
}
lintOptions {
    disable "ResourceType"
    checkReleaseBuilds false
    abortOnError false
}

signingConfigs {
    release {
        //注意:该签名文件的备份在项目内,使用路径可以改变
        storeFile file("xxx.jks")
        storePassword "11111"
        keyAlias "11"
        keyPassword "1111"
        v2SigningEnabled false
    }
}
buildTypes {
    debug {
        //debug时使用release签名
        signingConfig signingConfigs.release

    }
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
        disable 'GoogleAppIndexingWarning'
    }
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        debuggable true
        signingConfig signingConfigs.release
    }
}最后 Run As  问题解决。

 

 

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页