はじめに
Flutterでapkをビルドしようとしたら以下のようなエラーが表示された
Failed to read key AndroidDebugKey from store ...
更新履歴
2021.8.7 初回投稿
環境
- Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale ja-JP)
- Android toolchain - develop for Android devices (Android SDK version 31.0.0)
- Xcode - develop for iOS and macOS
- Chrome - develop for the web
- Android Studio (version 2020.3)
- VS Code (version 1.59.0)
参考にしたサイト
エラー内容
* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/Users/kazukoba/.android/debug.keystore": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available
修正方法
~/.android/配下の「debug.keystore」を削除して再度ビルドしなおせばOK
% cd ~/.android
% rm debug.keystore
以上