尝试运行android测试时INSTALL_PARSE_FAILED_NO_CERTIFICATES错误

时间:2015-10-30 10:29:49

标签: android android-testing

  

构建工具:23.0.2

     

gradle:2.8

     

android gradle插件:1.4.0-beta6

我尝试过使用各种不同版本的工具但没有成功。我也试过禁用签名配置,但我仍然得到相同的错误。它工作正常。然后它突然开始给我这个错误,我已经尝试./gradlew uninstallAll再次运行它没有成功。以下是我在尝试运行测试时看到的输出,其中{package}是应用程序的包名称和{project path},它只是项目的文件系统路径:

Testing started at 12:16 PM ...
Target device: motorola-nexus_6-ZX1G225WRT
Installing APK: /{project path}/app/build/outputs/apk/app-debug.apk
Uploading file to: /data/local/tmp/{package}
Installing {package}
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/{package}"
    pkg: /data/local/tmp/{package}
Success


Installing APK: /{project path}/app/build/outputs/apk/app-debug-androidTest-unaligned.apk
Uploading file to: /data/local/tmp/{package}.test
Installing {package}.test
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/{package}.test"
    pkg: /data/local/tmp/{package}.test
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]


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.

1 个答案:

答案 0 :(得分:0)

这似乎与使用square的okhttp模拟服务器有关。删除依赖项时,一切似乎再次正常工作,有些人表示这与最新构建工具中的错误相关