Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Picking Wrong Keystore path and giving error key.jks not found

Tags:

flutter

dart

I followed all the steps on the Flutter official site and thought I'd done everything correctly but it is failing to locate the keystore file when I build it.

This is the error message I get showing it taking wrong path instead of D:\flutterapps\testapp\key.jks:

PS D:\flutterapps\testapp> flutter build apk
Initializing gradle...                                       1.3s
Resolving dependencies...                                    4.3s
Gradle task 'assembleRelease'...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file 'D:\flutterapps\testapp\android\app\ D: lutterappspublishkey.jks' not found for signing config 'release'.

* 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 4s
Gradle task 'assembleRelease'... Done                        5.3s
Gradle task assembleRelease failed with exit code 1
PS D:\flutterapps\testapp>
like image 776
Gudguy Avatar asked Dec 29 '18 21:12

Gudguy


People also ask

Where do I put JKS in flutter?

Create an upload keystore jks file in your home directory.

How do I open a JKS file?

How to open a JKS file. Provided you know a JKS file's password, you can open it and view its contents using KeyStore Explorer, a multiplatform app that allows users to create, import, export, and save various KeyStore files.


1 Answers

On Windows you have to use 2 backslashes to indicate the path separation. In your key.properties, you should have something like this:

storeFile=D:\\flutterapps\\testapp\\key.jks

You don't need to copy your key.jks file to your flutter project.

like image 56
Nathan Teyou Avatar answered Sep 21 '22 22:09

Nathan Teyou