1,Android studio 打签名包
2,android studio 在真机上编译
在真机上编译,运行apk文件,有两种 debug,release模式,debug 模式不需要打签名包,release需要打签名包。
首先 先查看默认编译模式是哪一种
如果是debug 模式,可以直接在真机上编译,运行app。
如果是release模式,需要添加签名,否则的话运行失败,会报下面的错误。
app-release-unsigned.apk is not signed. Please configure the signing information for the selected flavor using the Project Structure dialog.
解决方案如下