Error: The apk for your currently selected variant (app-release-unsigned.apk) is not signed. Please

今天编辑代码的时候遇见了个这么个问题 : Error: The apk for your currently selected variant (app-release-unsigned.apk) is not signed. Please specify a signing configuration for this variant (release).

1、编辑build运行成功

2、无报错信息

3、项目标识出竟然有个x号

刚开始找错误信息的时候并没有找到,后来发现原来在configuration里面

当报错的时候点击run方法

Error: The apk for your currently selected variant (app-release-unsigned.apk) is not signed. Please_第1张图片

会出现一个configuration配置页面

Error: The apk for your currently selected variant (app-release-unsigned.apk) is not signed. Please_第2张图片

可以看到报错信息是Error: The apk for your currently selected variant (app-release-unsigned.apk) is not signed. Please

大致意思就是 你当前的app需要配置签名才可以

解决办法有两种:

一、就是上面所说的给app配置签名信息

1、打开Android Studio的 File -> Project Structure 面板,右键单击左侧导航栏中的app,打开模块设置

Error: The apk for your currently selected variant (app-release-unsigned.apk) is not signed. Please_第3张图片

配置签名文件的过程我就不说了,这个其实只针对 Build variants设置为Release模式的时候

二、还有一种解决办法简单粗暴,就是将Build variants设置为Debug模式 因为本人是写的一个依赖库,所以这个方法对我来讲可行没必要专门搞一套签名文件

Error: The apk for your currently selected variant (app-release-unsigned.apk) is not signed. Please_第4张图片

就是这么简单就可以解决这个问题,切换完成之后等待编译完成就可以了

然后就又可以愉快的编程了

date:2020.09.04  11:19:22 (周五 北京 晴)

 

 

你可能感兴趣的:(Error:,The,apk,for,your,currently,s,Android,studio,项目编译成功,无法运行问题)