Android Studio无法生成签名的APK文件 [英] Android Studio Can not generate signed APK file
问题描述
每个人,我都试图用Android Studio,Firts生成一个已签名的APK文件,我将构建变体"从调试更改为发布,然后在grade.app minifyEnabled上我设置为真,最后我创建了我的密钥并我的密码,直到这里一切都没问题,但是在我最后一次点击时,Android studio尝试生成文件,但此消息出现了
Everybody, im trying to generate a signed APK file , with android studio, Firts of all, I changed the "Build variant" from debug to release, then on grade.app minifyEnabled i put true, finally I created my Key and my password, and everything is alright until here, but on my last click, Android studio trys to generate the file but this message comes out
警告:com.google.android.gms.auth.GoogleAuthUtil:找不到引用的方法'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)"在库类android.app.Notification
Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification
警告:有1个未解决的对库类成员的引用.您可能需要更新库版本.( http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember):app:proguard发布失败
Warning: there were 1 unresolved references to library class members. You probably need to update the library versions. (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember) :app:proguardRelease FAILED
失败:构建失败,并出现异常.
FAILURE: Build failed with an exception.
出了什么问题:任务':app:proguardRelease'的执行失败.java.io.IOException:请首先更正以上警告.
What went wrong: Execution failed for task ':app:proguardRelease'. java.io.IOException: Please correct the above warnings first.
尝试:使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug选项运行,以获取更多日志输出.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
建立失败
该软件太新了,所以请耐心等待,我不知道我应该更新哪个库.我的compileSdkVersion是23,我的目标sdk版本是23.
im too new with this software , so please be patient with me, i dont know which libraries should i Update. My compileSdkVersion is 23, and my targed sdk version is 23.
谢谢大家.
这是我的build.grade文件
here is my build.grade file
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.manuelrios.aplicacion_inmobiliaria"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.google.android.gms:play-services:4.2.42'
}
推荐答案
在应用程序gradle中添加以下代码
Add the below code in your app gradle
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
.
.
.
lintOptions {
checkReleaseBuilds false
}
}
这篇关于Android Studio无法生成签名的APK文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!