1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Flutter】androidアプリをリリースしたときに躓いた

Posted at

背景

Flutterで作成したandroidアプリを始めてリリースする際、アップロード用アプリをビルドするところで躓きました。

エラー文

terminalでアプリをビルドするコマンドを打ったらエラーが出ました。

$ flutter build apk
C:\Users\<フォルダ名>\<アプリ名>>flutter build appbundle

Building without sound null safety
For more information see [https://dart.dev/null-safety/unsound-null-safety](https://dart.dev/null-safety/unsound-null-safety)

FAILURE: Build failed with an exception.

- What went wrong:
Execution failed for task ':app:validateSigningRelease'.

> Keystore file 'C:\Users\<フォルダ名>\<アプリ名>\android\app\key.jks' not found for signing config 'relea
se'.

- 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 g
et full insights.
- Get more help at [https://help.gradle.org](https://help.gradle.org/)

BUILD FAILED in 22s
Running Gradle task 'bundleRelease'...                             24.2s
Gradle task bundleRelease failed with exit code 1""

解決方法

keyの設置場所が間違っていて、android/key.propertiesのstoreFileを以下の値に修正したらエラーがなくなりビルドに成功しました。

android/key.properties
storePassword=<自分のパスワード>
keyPassword=<自分のパスワード>
keyAlias=key
storeFile= ./key.jks
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?