142

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' } 
1
  • 1
    Helpful Question, Thanks! Commented Feb 18, 2021 at 8:33

18 Answers 18

191

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I got this error after moving my .jks file to another location and forgot to update in android studio x) Thanks
66

File -> Invalidate Caches & Restart...

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

Check the key store path

1 Comment

Thank you. This did it for me. I had the issue after moving the project folder.
42

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.

4 Comments

exactly this is the accurate solution
Easy but that's what I needed. Thank you
Thank you So much . Your answer correct and worked for me .
This is the correct answer! I face this issue when opened an cloned project!
15

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.

Comments

14

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.

1 Comment

Android studio let you choose a folder and that was my problem... I chose the folder, not the key file... -1 for Android Studio for letting choose something is not going to work.
9

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"

1 Comment

really helpful. Jazakal Allah
5

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.

Comments

5

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

storeFile file('upload-keystore.jks') 

Comments

4

Editing the path of the keystore file solved my problem.

Comments

2

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

Comments

2

When I cloned the project I faced this issue then I solved this problem by following steps: 1 - Generate signed bundle/apk from topbar->Build->Generate signed Bundle->next->add file path enter image description here

2. In your build.gradle(module)

signingConfigs { debug { storeFile file('F:\\Sofit Apps\\niam_charging_animation-wajid_notification\\niam_charging_animation-wajid_notification\\credentials\\charginganimation_ct.jks')//your jks file path here } release { storeFile file('F:\\Sofit Apps\\niam_charging_animation-wajid_notification\\niam_charging_animation-wajid_notification\\credentials\\charginganimation_ct.jks')//your jks file path here } } 

hope this will solve your problem, as it worked for me.

Comments

1

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

Comments

1

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

signingConfigs { release { storeFile file('<Project Path>') } } 

Comments

0

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 

Comments

0

Please make sure your keystore file name does not contain any spaces e.g.

  • Not like this

enter image description here

*** Must be like this**

enter image description here

Comments

0

Sometimes you have the key but it gets saved as 'Untitled' usually in your app folder after your first uploaded version.

So all you have to do is rename it (to any name) but add the extension '.jks' then generate signed bundle again and enter password

I renamed mined from 'Untitled' to 'keystore.jks' as in the image below then everything started working as usual.

enter image description here

Comments

0

In my case, it created a file without any extension (txt). I just updated extension from .txt to .jks and it started worked perfectly.

Comments

0

just change the location of your keystore file but on the same disk. Note : your project and keystore file should be in same disk.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.