首页 > 解决方案 > 生成签名的 APK:构建 APK 时出错。你可以找到错误

问题描述

当我尝试生成 singend apk 时,它的 show apk singend 失败

bulid.gradle 文件

apply plugin: 'com.android.application'

安卓 {

compileSdkVersion 29
buildToolsVersion "29.0.3"

defaultConfig {
    applicationId "com.fma.airhorn"
    minSdkVersion 16
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

}

依赖项 { implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

}

///////////////////////////////////////// /////////////////////////////////////////消息失败

FAILURE:构建失败并出现异常。

42 秒内构建失败

标签: javaandroidandroid-studiogradlebuild.gradle

解决方案


您可能放错了keystore.jks文件的路径。

检查你的keystore路径。keystore找到第一次生成路径的位置。检查 C:\Users.android


推荐阅读