任务“:app:validateSigningRelease"执行失败.颤振错误 [英] Execution failed for task ':app:validateSigningRelease'. Flutter error

查看:25
本文介绍了任务“:app:validateSigningRelease"执行失败.颤振错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发布我的应用,但遇到了这个问题

I want to release my app but stack with this issue

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file 'D:\FlutterProjects\Panaszok\02012020 - Copy (2) - Copy\Multi Restaurants Flutter App\android\app\key\panaszok.jks' not found for signing config 'release'.

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
Running Gradle task 'assembleRelease'...                           23.9s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1



----------------------------------Here is my build gradle-------------------------------------------------

    def localProperties = new Properties()
    def localPropertiesFile = rootProject.file('local.properties')
    if (localPropertiesFile.exists()) {
        localPropertiesFile.withReader('UTF-8') { reader ->
            localProperties.load(reader)
        }
    }

    def flutterRoot = localProperties.getProperty('flutter.sdk')
    if (flutterRoot == null) {
        throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
    }

    def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
    if (flutterVersionCode == null) {
        flutterVersionCode = '1'
    }

    def flutterVersionName = localProperties.getProperty('flutter.versionName')
    if (flutterVersionName == null) {
        flutterVersionName = '1.0'
    }

    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

    def keystorePropertiesFile = rootProject.file("key.properties")
    def keystoreProperties = new Properties()
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

    android {
        compileSdkVersion 28

        sourceSets {
            main.java.srcDirs += 'src/main/kotlin'
        }

        lintOptions {
            disable 'InvalidPackage'
        }

        defaultConfig {
            // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
            applicationId "com.panaszok.app"
            minSdkVersion 21
            targetSdkVersion 28
            versionCode flutterVersionCode.toInteger()
            versionName flutterVersionName
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }

        signingConfigs {
            release {
                keyAlias keystoreProperties['keyAlias']
                keyPassword keystoreProperties['keyPassword']
                storeFile file(keystoreProperties['storeFile'])
                storePassword keystoreProperties['storePassword']
            }
        }

        buildTypes {
            release {
                // TODO: Add your own signing config for the release build.
                // Signing with the debug keys for now, so `flutter run --release` works.
    //            signingConfig signingConfigs.debug
                signingConfig signingConfigs.release
            }
        }
    }

    flutter {
        source '../..'
    }

    dependencies {
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        implementation 'com.google.firebase:firebase-messaging:20.0.1'
        implementation 'androidx.annotation:annotation:1.1.0'
        implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test:runner:1.1.1'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    }

    //apply plugin: 'com.google.gms.google-services'

----------------------------------------这里是关键属性------------------------------------------

----------------------------------------here is Key properties-----------------------------------------

storePassword=myPss
keyPassword=MyKpss
keyAlias=key
storeFile=D:/FlutterProjects/Panaszok/02012020 - Copy (2) - Copy/Multi Restaurants Flutter App/android/app/key/panaszok.jks

--------------------------------------这里是颤振医生-v------------------------------------------

--------------------------------------Here is flutter doctor -v-----------------------------------------

    [√] Flutter (Channel stable, v1.12.13+hotfix.7, on Microsoft Windows [Version 10.0.18363.657], locale en-US)
        • Flutter version 1.12.13+hotfix.7 at C:\src\flutter
        • Framework revision 9f5ff2306b (3 weeks ago), 2020-01-26 22:38:26 -0800
        • Engine revision a67792536c
        • Dart version 2.7.0


    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
        • Android SDK at C:\Users\Office\AppData\Local\Android\sdk
        • Android NDK location not configured (optional; useful for native profiling support)
        • Platform android-29, build-tools 29.0.2
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
        • All Android licenses accepted.

    [√] Android Studio (version 3.5)
        • Android Studio at C:\Program Files\Android\Android Studio
        • Flutter plugin version 43.0.1
        • Dart plugin version 191.8593
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

    [√] VS Code (version 1.41.1)
        • VS Code at C:\Users\Office\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.7.1

    [√] Connected device (1 available)
        • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)

• No issues found!

我试过这个方法,但它没有帮助,并给出了另一个错误

I tried this method but it did not help and gave another error

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

---------------------------------- minifyEnabled 后出错 ---------------------------------

----------------------------------Error after minifyEnabled false--------------------------------------------

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\FlutterProjects\Panaszok\02012020 - Copy (2) - Copy\Multi Restaurants Flutter App\android\build.gradle' line: 28

* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
   > Removing unused resources requires unused code shrinking to be turned on. See http://d.android.com/r/tools/shrink-resources.html for more information.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 870ms
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                       1.5s
Gradle task assembleRelease failed with exit code 1

推荐答案

问题很清楚

未找到用于签署配置发布"的密钥库文件

Keystore file not found for signing config 'release'

检查此路径

'D:\FlutterProjects\Panaszok\02012020 - Copy (2) - Copy\Multi Restaurants Flutter App\android\app\key\panaszok.jks'

这篇关于任务“:app:validateSigningRelease"执行失败.颤振错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆