首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >任务执行失败:app:signReleaseBundle‘

任务执行失败:app:signReleaseBundle‘
EN

Stack Overflow用户
提问于 2022-01-20 03:37:09
回答 4查看 6.9K关注 0票数 3

我现在有个错误要做flutter build appbundle

这是一个错误:

代码语言:javascript
运行
复制
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:signReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Failed to read key sd from store "C:\flutter_project\cursin2\cursin-main\android\app\upload-keystore.jks": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available

* 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 6s
Running Gradle task 'bundleRelease'...                              9,1s
Gradle task bundleRelease failed with exit code 1
PS C:\flutter_project\cursin2\cursin-main> 

我试过各种方法来修复它,但是错误仍然出现。

我的key.properties:

代码语言:javascript
运行
复制
storePassword=ul109000
keyPassword=ul109000
keyAlias=sd
storeFile=C:/flutter_project/cursin2/cursin-main/android/app/upload-keystore.jks
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2022-01-21 15:59:53

解决这个问题的唯一方法,对我来说是有效的:

  1. 颤振干净的
  2. 编辑我在关键程序中使用的路径。

例如:“./upload keystore.jks”转到“C:/key/myapp/上载-keystore.jks”。

票数 1
EN

Stack Overflow用户

发布于 2022-01-20 04:49:12

在android app/ build.gradle

内部android标签

代码语言:javascript
运行
复制
def keystoreProperties = new Properties()
    def keystorePropertiesFile = rootProject.file('key.properties')
    if (keystorePropertiesFile.exists()) {
        keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
    }

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

storeFile路径将为./upload-keystore.jks

代码语言:javascript
运行
复制
 buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            minifyEnabled true
            shrinkResources true
            signingConfig signingConfigs.release
        }
    }
票数 3
EN

Stack Overflow用户

发布于 2022-03-06 13:51:24

删除以下内容:

代码语言:javascript
运行
复制
debug {
    storeFile file(storeFile_)
    storePassword storePassword_
    keyAlias keyAlias_
    keyPassword keyPassword_
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70780523

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档