在构建我的颤振应用程序时,我得到了以下错误。在仿真器上测试应用程序时,我没有收到任何错误,而且运行良好。我不知道大楼怎么了。我很感激你能提供的任何帮助。
颤振版本: v2.5.3 - devtools: v2.8.0
我使用这个命令来构建应用程序:
flutter build apk --split-per-abi
这里是错误日志:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageRelease'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key upload from store "/Users/USER_NAME/Documents/APP_NAME/main_files/source/wordpress_app/android/app/upload-keystore.jks": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key upload from store "/Users/USER_NAME/Documents/APP_NAME/main_files/source/wordpress_app/android/app/upload-keystore.jks": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key upload from store "/Users/USER_NAME/Documents/APP_NAME/main_files/source/wordpress_app/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 2m 14s
Running Gradle task 'assembleRelease'... 135.8s
Gradle task assembleRelease failed with exit code 1
发布于 2021-12-23 09:24:22
这里是解决方案:
尝试以下命令:
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload -storetype JKS
附加属性
-storetype JKS
注意:Java9或更高版本只需要-storetype JKS标记。在Java9发行版中,keystore类型默认为PKS12。
https://stackoverflow.com/questions/70450717
复制相似问题