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












0















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:flutterappstestappkey.jks:



PS D:flutterappstestapp> 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:flutterappstestappandroidapp 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:flutterappstestapp>









share|improve this question

























  • Which steps are you referring to from the official site? What is your directory structure?

    – Iain Duncan
    Dec 29 '18 at 21:15











  • It seems that it’s serching the .jks file inside the app folder and not the parent. Tey put it on ./android/app. Btw how did you set up the signin keystore? With AS, by hand in gradle file, or what?

    – shadowsheep
    Dec 29 '18 at 21:17













  • I set signing by this keytool -genkey -v -keystore D:flutterappstestappkey.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key in terminal and it gave succsesful mesaage and created key.jks file also in that path

    – Gudguy
    Dec 29 '18 at 21:25













  • It considering its path as key.properties file path instead key.jks

    – Gudguy
    Dec 29 '18 at 21:33
















0















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:flutterappstestappkey.jks:



PS D:flutterappstestapp> 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:flutterappstestappandroidapp 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:flutterappstestapp>









share|improve this question

























  • Which steps are you referring to from the official site? What is your directory structure?

    – Iain Duncan
    Dec 29 '18 at 21:15











  • It seems that it’s serching the .jks file inside the app folder and not the parent. Tey put it on ./android/app. Btw how did you set up the signin keystore? With AS, by hand in gradle file, or what?

    – shadowsheep
    Dec 29 '18 at 21:17













  • I set signing by this keytool -genkey -v -keystore D:flutterappstestappkey.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key in terminal and it gave succsesful mesaage and created key.jks file also in that path

    – Gudguy
    Dec 29 '18 at 21:25













  • It considering its path as key.properties file path instead key.jks

    – Gudguy
    Dec 29 '18 at 21:33














0












0








0








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:flutterappstestappkey.jks:



PS D:flutterappstestapp> 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:flutterappstestappandroidapp 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:flutterappstestapp>









share|improve this question
















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:flutterappstestappkey.jks:



PS D:flutterappstestapp> 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:flutterappstestappandroidapp 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:flutterappstestapp>






dart flutter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 29 '18 at 21:22







Gudguy

















asked Dec 29 '18 at 21:06









GudguyGudguy

14




14













  • Which steps are you referring to from the official site? What is your directory structure?

    – Iain Duncan
    Dec 29 '18 at 21:15











  • It seems that it’s serching the .jks file inside the app folder and not the parent. Tey put it on ./android/app. Btw how did you set up the signin keystore? With AS, by hand in gradle file, or what?

    – shadowsheep
    Dec 29 '18 at 21:17













  • I set signing by this keytool -genkey -v -keystore D:flutterappstestappkey.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key in terminal and it gave succsesful mesaage and created key.jks file also in that path

    – Gudguy
    Dec 29 '18 at 21:25













  • It considering its path as key.properties file path instead key.jks

    – Gudguy
    Dec 29 '18 at 21:33



















  • Which steps are you referring to from the official site? What is your directory structure?

    – Iain Duncan
    Dec 29 '18 at 21:15











  • It seems that it’s serching the .jks file inside the app folder and not the parent. Tey put it on ./android/app. Btw how did you set up the signin keystore? With AS, by hand in gradle file, or what?

    – shadowsheep
    Dec 29 '18 at 21:17













  • I set signing by this keytool -genkey -v -keystore D:flutterappstestappkey.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key in terminal and it gave succsesful mesaage and created key.jks file also in that path

    – Gudguy
    Dec 29 '18 at 21:25













  • It considering its path as key.properties file path instead key.jks

    – Gudguy
    Dec 29 '18 at 21:33

















Which steps are you referring to from the official site? What is your directory structure?

– Iain Duncan
Dec 29 '18 at 21:15





Which steps are you referring to from the official site? What is your directory structure?

– Iain Duncan
Dec 29 '18 at 21:15













It seems that it’s serching the .jks file inside the app folder and not the parent. Tey put it on ./android/app. Btw how did you set up the signin keystore? With AS, by hand in gradle file, or what?

– shadowsheep
Dec 29 '18 at 21:17







It seems that it’s serching the .jks file inside the app folder and not the parent. Tey put it on ./android/app. Btw how did you set up the signin keystore? With AS, by hand in gradle file, or what?

– shadowsheep
Dec 29 '18 at 21:17















I set signing by this keytool -genkey -v -keystore D:flutterappstestappkey.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key in terminal and it gave succsesful mesaage and created key.jks file also in that path

– Gudguy
Dec 29 '18 at 21:25







I set signing by this keytool -genkey -v -keystore D:flutterappstestappkey.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key in terminal and it gave succsesful mesaage and created key.jks file also in that path

– Gudguy
Dec 29 '18 at 21:25















It considering its path as key.properties file path instead key.jks

– Gudguy
Dec 29 '18 at 21:33





It considering its path as key.properties file path instead key.jks

– Gudguy
Dec 29 '18 at 21:33












2 Answers
2






active

oldest

votes


















0














it's wherever call it from in your build.gradle. insert this:



signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}


and call this in above your android{}:



def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))


and that key.properties file (which should be in your root android folder) should have this:



storePassword=12345
keyPassword=12345
keyAlias=key
storeFile=/Users/me/somekey.jks





share|improve this answer
























  • Sorry I did mentioned that I already followed those three steps as per flutter.io/docs/deployment/android

    – Gudguy
    Dec 29 '18 at 21:18













  • it giving this weird error path Keystore file 'D:flutterappspublishandroidappD: lutterappspublishkey.jks' not found for signing config 'release'.

    – Gudguy
    Dec 29 '18 at 21:20











  • what did you set as the storeFile?

    – blaneyneil
    Dec 29 '18 at 21:24











  • my key store file name is key.jks but it taking something as Keystore file 'D:flutterappstestappandroidapp (less than sign) D: lutterappspublishkey.jks (greater than sign)' not found for signing config 'release'.

    – Gudguy
    Dec 29 '18 at 21:29











  • you sure you're calling in the key.properties file?

    – blaneyneil
    Dec 29 '18 at 21:41



















0














modified key.properties file with



storePassword=123456
keyPassword=123456
keyAlias=key
storeFile=key.jks


instead of this



storePassword=123456
keyPassword=123456
keyAlias=key
storeFile=D:flutterappstestappkey.jks


and also moved key.jks to
D:flutterappstestappandroidappkey.jks



as this path shown in error inside terminal



Thanks all.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53973333%2fflutter-picking-wrong-keystore-path-and-giving-error-key-jks-not-found%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    it's wherever call it from in your build.gradle. insert this:



    signingConfigs {
    release {
    keyAlias keystoreProperties['keyAlias']
    keyPassword keystoreProperties['keyPassword']
    storeFile file(keystoreProperties['storeFile'])
    storePassword keystoreProperties['storePassword']
    }
    }


    and call this in above your android{}:



    def keystorePropertiesFile = rootProject.file("key.properties")
    def keystoreProperties = new Properties()
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))


    and that key.properties file (which should be in your root android folder) should have this:



    storePassword=12345
    keyPassword=12345
    keyAlias=key
    storeFile=/Users/me/somekey.jks





    share|improve this answer
























    • Sorry I did mentioned that I already followed those three steps as per flutter.io/docs/deployment/android

      – Gudguy
      Dec 29 '18 at 21:18













    • it giving this weird error path Keystore file 'D:flutterappspublishandroidappD: lutterappspublishkey.jks' not found for signing config 'release'.

      – Gudguy
      Dec 29 '18 at 21:20











    • what did you set as the storeFile?

      – blaneyneil
      Dec 29 '18 at 21:24











    • my key store file name is key.jks but it taking something as Keystore file 'D:flutterappstestappandroidapp (less than sign) D: lutterappspublishkey.jks (greater than sign)' not found for signing config 'release'.

      – Gudguy
      Dec 29 '18 at 21:29











    • you sure you're calling in the key.properties file?

      – blaneyneil
      Dec 29 '18 at 21:41
















    0














    it's wherever call it from in your build.gradle. insert this:



    signingConfigs {
    release {
    keyAlias keystoreProperties['keyAlias']
    keyPassword keystoreProperties['keyPassword']
    storeFile file(keystoreProperties['storeFile'])
    storePassword keystoreProperties['storePassword']
    }
    }


    and call this in above your android{}:



    def keystorePropertiesFile = rootProject.file("key.properties")
    def keystoreProperties = new Properties()
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))


    and that key.properties file (which should be in your root android folder) should have this:



    storePassword=12345
    keyPassword=12345
    keyAlias=key
    storeFile=/Users/me/somekey.jks





    share|improve this answer
























    • Sorry I did mentioned that I already followed those three steps as per flutter.io/docs/deployment/android

      – Gudguy
      Dec 29 '18 at 21:18













    • it giving this weird error path Keystore file 'D:flutterappspublishandroidappD: lutterappspublishkey.jks' not found for signing config 'release'.

      – Gudguy
      Dec 29 '18 at 21:20











    • what did you set as the storeFile?

      – blaneyneil
      Dec 29 '18 at 21:24











    • my key store file name is key.jks but it taking something as Keystore file 'D:flutterappstestappandroidapp (less than sign) D: lutterappspublishkey.jks (greater than sign)' not found for signing config 'release'.

      – Gudguy
      Dec 29 '18 at 21:29











    • you sure you're calling in the key.properties file?

      – blaneyneil
      Dec 29 '18 at 21:41














    0












    0








    0







    it's wherever call it from in your build.gradle. insert this:



    signingConfigs {
    release {
    keyAlias keystoreProperties['keyAlias']
    keyPassword keystoreProperties['keyPassword']
    storeFile file(keystoreProperties['storeFile'])
    storePassword keystoreProperties['storePassword']
    }
    }


    and call this in above your android{}:



    def keystorePropertiesFile = rootProject.file("key.properties")
    def keystoreProperties = new Properties()
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))


    and that key.properties file (which should be in your root android folder) should have this:



    storePassword=12345
    keyPassword=12345
    keyAlias=key
    storeFile=/Users/me/somekey.jks





    share|improve this answer













    it's wherever call it from in your build.gradle. insert this:



    signingConfigs {
    release {
    keyAlias keystoreProperties['keyAlias']
    keyPassword keystoreProperties['keyPassword']
    storeFile file(keystoreProperties['storeFile'])
    storePassword keystoreProperties['storePassword']
    }
    }


    and call this in above your android{}:



    def keystorePropertiesFile = rootProject.file("key.properties")
    def keystoreProperties = new Properties()
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))


    and that key.properties file (which should be in your root android folder) should have this:



    storePassword=12345
    keyPassword=12345
    keyAlias=key
    storeFile=/Users/me/somekey.jks






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 29 '18 at 21:15









    blaneyneilblaneyneil

    46414




    46414













    • Sorry I did mentioned that I already followed those three steps as per flutter.io/docs/deployment/android

      – Gudguy
      Dec 29 '18 at 21:18













    • it giving this weird error path Keystore file 'D:flutterappspublishandroidappD: lutterappspublishkey.jks' not found for signing config 'release'.

      – Gudguy
      Dec 29 '18 at 21:20











    • what did you set as the storeFile?

      – blaneyneil
      Dec 29 '18 at 21:24











    • my key store file name is key.jks but it taking something as Keystore file 'D:flutterappstestappandroidapp (less than sign) D: lutterappspublishkey.jks (greater than sign)' not found for signing config 'release'.

      – Gudguy
      Dec 29 '18 at 21:29











    • you sure you're calling in the key.properties file?

      – blaneyneil
      Dec 29 '18 at 21:41



















    • Sorry I did mentioned that I already followed those three steps as per flutter.io/docs/deployment/android

      – Gudguy
      Dec 29 '18 at 21:18













    • it giving this weird error path Keystore file 'D:flutterappspublishandroidappD: lutterappspublishkey.jks' not found for signing config 'release'.

      – Gudguy
      Dec 29 '18 at 21:20











    • what did you set as the storeFile?

      – blaneyneil
      Dec 29 '18 at 21:24











    • my key store file name is key.jks but it taking something as Keystore file 'D:flutterappstestappandroidapp (less than sign) D: lutterappspublishkey.jks (greater than sign)' not found for signing config 'release'.

      – Gudguy
      Dec 29 '18 at 21:29











    • you sure you're calling in the key.properties file?

      – blaneyneil
      Dec 29 '18 at 21:41

















    Sorry I did mentioned that I already followed those three steps as per flutter.io/docs/deployment/android

    – Gudguy
    Dec 29 '18 at 21:18







    Sorry I did mentioned that I already followed those three steps as per flutter.io/docs/deployment/android

    – Gudguy
    Dec 29 '18 at 21:18















    it giving this weird error path Keystore file 'D:flutterappspublishandroidappD: lutterappspublishkey.jks' not found for signing config 'release'.

    – Gudguy
    Dec 29 '18 at 21:20





    it giving this weird error path Keystore file 'D:flutterappspublishandroidappD: lutterappspublishkey.jks' not found for signing config 'release'.

    – Gudguy
    Dec 29 '18 at 21:20













    what did you set as the storeFile?

    – blaneyneil
    Dec 29 '18 at 21:24





    what did you set as the storeFile?

    – blaneyneil
    Dec 29 '18 at 21:24













    my key store file name is key.jks but it taking something as Keystore file 'D:flutterappstestappandroidapp (less than sign) D: lutterappspublishkey.jks (greater than sign)' not found for signing config 'release'.

    – Gudguy
    Dec 29 '18 at 21:29





    my key store file name is key.jks but it taking something as Keystore file 'D:flutterappstestappandroidapp (less than sign) D: lutterappspublishkey.jks (greater than sign)' not found for signing config 'release'.

    – Gudguy
    Dec 29 '18 at 21:29













    you sure you're calling in the key.properties file?

    – blaneyneil
    Dec 29 '18 at 21:41





    you sure you're calling in the key.properties file?

    – blaneyneil
    Dec 29 '18 at 21:41













    0














    modified key.properties file with



    storePassword=123456
    keyPassword=123456
    keyAlias=key
    storeFile=key.jks


    instead of this



    storePassword=123456
    keyPassword=123456
    keyAlias=key
    storeFile=D:flutterappstestappkey.jks


    and also moved key.jks to
    D:flutterappstestappandroidappkey.jks



    as this path shown in error inside terminal



    Thanks all.






    share|improve this answer




























      0














      modified key.properties file with



      storePassword=123456
      keyPassword=123456
      keyAlias=key
      storeFile=key.jks


      instead of this



      storePassword=123456
      keyPassword=123456
      keyAlias=key
      storeFile=D:flutterappstestappkey.jks


      and also moved key.jks to
      D:flutterappstestappandroidappkey.jks



      as this path shown in error inside terminal



      Thanks all.






      share|improve this answer


























        0












        0








        0







        modified key.properties file with



        storePassword=123456
        keyPassword=123456
        keyAlias=key
        storeFile=key.jks


        instead of this



        storePassword=123456
        keyPassword=123456
        keyAlias=key
        storeFile=D:flutterappstestappkey.jks


        and also moved key.jks to
        D:flutterappstestappandroidappkey.jks



        as this path shown in error inside terminal



        Thanks all.






        share|improve this answer













        modified key.properties file with



        storePassword=123456
        keyPassword=123456
        keyAlias=key
        storeFile=key.jks


        instead of this



        storePassword=123456
        keyPassword=123456
        keyAlias=key
        storeFile=D:flutterappstestappkey.jks


        and also moved key.jks to
        D:flutterappstestappandroidappkey.jks



        as this path shown in error inside terminal



        Thanks all.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 30 '18 at 16:34









        GudguyGudguy

        14




        14






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53973333%2fflutter-picking-wrong-keystore-path-and-giving-error-key-jks-not-found%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Mossoró

            Error while reading .h5 file using the rhdf5 package in R

            Pushsharp Apns notification error: 'InvalidToken'