Android Error Building Signed APK: keystore.jks not found for signing config 'externalOverride'

AndroidAndroid StudioBuildApkAndroid Signing

Android Problem Overview


I get this error when I try to Build Signed APK. I recently upgraded to API 23 but Generated APK:s successfully after that. Im confused. Asking for help and advise how to solve this problem. Here's the error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateExternalOverrideSigning'.
> Keystore file /Users/me/Desktop/final apps/keystore.jks not 
found for signing config 'externalOverride'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --  
debug option to get more log output.

And the log

Information:Gradle tasks [:app:assembleRelease]
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement810Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:processReleaseManifest UP-TO-DATE
:app:processReleaseResources UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources
:app:lintVitalRelease
:app:transformClassesWithDexForRelease
:app:mergeReleaseJniLibFolders
:app:transformNative_libsWithMergeJniLibsForRelease
:app:processReleaseJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForRelease
:app:validateExternalOverrideSigning FAILED
Error:Execution failed for task ':app:validateExternalOverrideSigning'.
> Keystore file /Users/me/Desktop/final apps/keystore.jks not found for
signing config 'externalOverride'. 

Here is my Gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"


defaultConfig {
    applicationId "com.waffles.vatsandbats"
    minSdkVersion 14
    targetSdkVersion 23
}

buildTypes {
    release {
        minifyEnabled false
         proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.txt'     
    }
}
}

dependencies {

compile files('libs/acra-4.7.0-javadoc.jar')
compile files('libs/acra-4.7.0-sources.jar')
compile files('libs/acra-4.7.0.jar')
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile files('libs/activation.jar')
compile files('libs/mail.jar')
compile files('libs/additionnal.jar')
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'


}

Android Solutions


Solution 1 - Android

I found the solution. I misplaced the path to the keystore.jks file. Searched for the file on my computer used that path and everything worked great.

Solution 2 - Android

File -> Invalidate Caches & Restart...

Build -> Build signed APK -> check the path in the dialog

Check the key store path

Solution 3 - Android

Click on choose existing and again choose the location where your jks file is located.

enter image description here

I hope this trick works for you.

Solution 4 - Android

This is a problem that can arise from writing down a "filename" instead of a path, while generating the .jks file. Generate a new one, put it on the Desktop (or any other real path) and re-generate APK.

Solution 5 - Android

TL;DR: Check the path to your keystore.jks file.

In my case, here's what happened:

I moved the project folder of my entire app to another location on my PC. Much later, I wanted to generate a signed apk file. Unknown to me, the default location of the path to my keystore.jks had been reset to a wrong location and I had clicked okay. Since it could not find a keystore at the path I selected, I got that error.

The solution was to check whether the path to my keystore.jks file was correct.

Solution 6 - Android

I have same problem, because i don't have keystore path then i see Waffles.inc solutions and had a new problem In my Android Studio 3.1 for mac had a windows dialog problem when trying create new keystore path, it's like this

enter image description here

if u have the same problem, don't worried about the black windows it's just typing your new keystore and then save.

Solution 7 - Android

open key.properties and check your path is correct. (replace from \ to /)

example:-

replace from "storeFile=D:\Projects\Flutter\Key\key.jks" to "storeFile=D:/Projects/Flutter/Key/key.jks"

Solution 8 - Android

Editing the path of the keystore file solved my problem.

Solution 9 - Android

File path was culprit for me changed filepath in app/build.gradle

storeFile file('upload-keystore.jks')

Solution 10 - Android

For people that have tried above,try generating the key with the -keypass and -storepass options as I was only inputting one of the passwords when running it like the React Native docs have you. This caused it to error out when trying to build.

keytool -keypass PASSWORD1 -storepass PASSWORD2 -genkeypair -v -keystore release2.keystore -alias release2 -keyalg RSA -keysize 2048 -validity 10000

Solution 11 - Android

I had an existing jks file which I had placed on my Desktop.

In the dialog I chose Choose Existing and used Drag and Drop to drop the jks file into the dialog as per this image.

enter image description here

The path is then automatically determined instead of having to navigated to the jks file location

Solution 12 - Android

On Linux or Ubuntu you need to use the complete path.

For example

/home/ubuntu/.android/keystorname.keystore

In my case I was using ~ instead of /home/user/. Using shorthands like the below does not work

~/.android/keystorname.keystore
./keystorename.keystore

Solution 13 - Android

In my case I was creating a release build and JKS was placed in buildTypes.gradle

signingConfigs {
    release {
        storeFilefile('<Project Path>') 
    }
}

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionWaffles.IncView Question on Stackoverflow
Solution 1 - AndroidWaffles.IncView Answer on Stackoverflow
Solution 2 - AndroidMartin PfefferView Answer on Stackoverflow
Solution 3 - AndroidMuzammilView Answer on Stackoverflow
Solution 4 - AndroidJacobo KoenigView Answer on Stackoverflow
Solution 5 - AndroidTaslim OseniView Answer on Stackoverflow
Solution 6 - AndroidUray FebriView Answer on Stackoverflow
Solution 7 - AndroidBIS TechView Answer on Stackoverflow
Solution 8 - AndroidknightView Answer on Stackoverflow
Solution 9 - AndroidAnil PoudyalView Answer on Stackoverflow
Solution 10 - AndroidMattFitzView Answer on Stackoverflow
Solution 11 - AndroidTonnieView Answer on Stackoverflow
Solution 12 - AndroidTrectView Answer on Stackoverflow
Solution 13 - AndroidFaizan Haidar KhanView Answer on Stackoverflow