Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android specified for property 'signingConfig.storeFile' does not exist

Im trying to generate signed APK Using AndroidStudio but I get this error:

    Error:A problem was found with the configuration of task ':app:packageRelease'.
> File 'com.pachu.fartsound' specified for property 'signingConfig.storeFile' does not exist.

i dont know if you need it but there is my build.gradle:

    apply plugin: 'com.android.application'
apply plugin: 'android'
android {
    compileSdkVersion 19
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.pachu.fartsounds"
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 1
        versionName "1.2"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:19.+'
    compile 'com.google.android.gms:play-services:5.0.89'
}
like image 469
Golan Kiviti Avatar asked Aug 08 '14 20:08

Golan Kiviti


4 Answers

Go to Build -> Generate Signed APK. Create your key (or choose existing) -> next -> next -> done!

If you want to do it "hard way" you need to specify already created release key into signingConfigs before buildTypes. Something like this:

signingConfigs {
        release {
            storeFile file("/yourkey.jks") //check that the file exists
            storePassword "YourPassword"
            keyAlias "YourAlias"
            keyPassword "YourPassword"
        }
    }

But this is useless somewhat. Because Android Studio provides very simple and easy way to create a signed APK file ready for publishing. And also specifying your key's password into the build.gradle file... - it isn't advisable to do it in terms of security.

like image 198
Nikolay Hristov Avatar answered Nov 15 '22 11:11

Nikolay Hristov


My key was in

APPROOT/myKey.jks

Whilst the gradle was looking in

APPROOT/app/myKey.jks

I think you specify that second path on the second dialogue when you generate the signed apk, but I haven't checked it out, can someone confirm?

like image 31
Voy Avatar answered Nov 15 '22 10:11

Voy


Try rebuilding the project. So go to Build-> Clean Project. Then generate the signed APK file again (Build -> Generate Signed APK).

like image 1
Gene Avatar answered Nov 15 '22 10:11

Gene


Make sure that you write the extension of the keystore file when firstly creating.

like image 1
xevser Avatar answered Nov 15 '22 11:11

xevser