flutter build apk --split-per-abi 执行错误
来源:15-2 【图解】Flutter集成与打包Android应用【持续更新】

汤彪
2024-03-23
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.PackageAndroidArtifactIncrementalSplitterRunnablecom.android.ide.common.signing.KeytoolException:Failedtoreadkeykeyfromstore"/Users/hhm/imooc/flutter/fa−router/android/key.jks":Integritycheckfailed:java.security.NoSuchAlgorithmException:AlgorithmHmacPBESHA256notavailableAfailureoccurredwhileexecutingcom.android.build.gradle.tasks.PackageAndroidArtifactIncrementalSplitterRunnable com.android.ide.common.signing.KeytoolException: Failed to read key key from store "/Users/hhm/imooc/flutter/fa-router/android/key.jks": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifactIncrementalSplitterRunnablecom.android.ide.common.signing.KeytoolException:Failedtoreadkeykeyfromstore"/Users/hhm/imooc/flutter/fa−router/android/key.jks":Integritycheckfailed:java.security.NoSuchAlgorithmException:AlgorithmHmacPBESHA256notavailableAfailureoccurredwhileexecutingcom.android.build.gradle.tasks.PackageAndroidArtifactIncrementalSplitterRunnable
com.android.ide.common.signing.KeytoolException: Failed to read key key from store “/Users/hhm/imooc/flutter/fa-router/android/key.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 key from store “/Users/hhm/imooc/flutter/fa-router/android/key.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 34s
jdk 版本我已经换成了 jdk16了 但是打包时候还是报错,麻烦问题老师有好的解决办法吗
1回答
-
汤彪
提问者
2024-03-23
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key -storetype jks
Mac 上面命令使用 上面不会报上面错误012024-03-23
相似问题