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/farouter/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.

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 上面命令使用 上面不会报上面错误

0
1
CrazyCodeBoy
嗯嗯,看log像是生成的密钥有问题
2024-03-23
共1条回复

Flutter高级进阶实战-仿哔哩哔哩-掌握Flutter高阶技能

一次性掌握Flutter高阶技能+商业级复杂项目架构设计与开发方案

1722 学习 · 870 问题

查看课程