我在github上下载了一个Android应用程序的zip文件,我试图运行它,但我得到了一个带有此消息的对话框
app-release-unsigned.apk is not signed. Please configure the signing information for the selected flavor using the Project Structure dialog.
我使用Android Studio。 我该怎么办?
我在github上下载了一个Android应用程序的zip文件,我试图运行它,但我得到了一个带有此消息的对话框
app-release-unsigned.apk is not signed. Please configure the signing information for the selected flavor using the Project Structure dialog.
我使用Android Studio。 我该怎么办?
当前回答
我成功地调试了签名的APK,遵循这个过程:-
在“Build Variant”工具栏中选择“release”版本 在构建中。Gradle为模块设置debuggable true为发布构建类型 去文件->项目结构->签名选项卡下填写所有信息->风味下 tab->选择刚刚创建的签名配置 设置断点 在调试模式下运行应用程序
其他回答
我成功地调试了签名的APK,遵循这个过程:-
在“Build Variant”工具栏中选择“release”版本 在构建中。Gradle为模块设置debuggable true为发布构建类型 去文件->项目结构->签名选项卡下填写所有信息->风味下 tab->选择刚刚创建的签名配置 设置断点 在调试模式下运行应用程序
确保构建变量在Android Studio中被设置为调试(而不是发布)(检查构建变量面板)。
如果设置为调试,它应该自动使用自动生成的调试密钥库对应用程序进行签名,而不需要编辑构建脚本。
但是,您将需要创建和配置一个特定的密钥存储库来发布。
官方文档,包括调试和发布模式:https://developer.android.com/tools/publishing/app-signing.html
您下载的应用程序项目可能在build.gradle文件中包含已签名的信息。如果你看到这样的代码:
buildTypes {
debug {
signingConfig signingConfigs.release
}
release {
signingConfig signingConfigs.release
}
}
您可以删除它们,然后重试。
我也出现了这个问题,下面是我的代码
storeFile file(properties.getProperty("filepath"))
storePassword properties.getProperty("keypassword")
keyAlias properties.getProperty("keyAlias")
keyPassword properties.getProperty("keypassword")
原因是属性名错误,它应该是keyPassword而不是keyPassword