3

I am trying to publish a simple project in android studio .so i go to menu>build>build apk .but i get this error :

Error:Execution failed for task ':app:packageDebug'.
> Failed to read key AndroidDebugKey from store "C:\Users\ehsan\.android\debug.keystore": Invalid keystore format

I am so new in android studio

enter image description here

Ehsan Akbar
  • 6,977
  • 19
  • 96
  • 180

2 Answers2

2

I'm also facing same issue. for mine getting this type of issue, when I run app with my physical device.

Solution Delete .android (path:C:\Users{your pc name}) folder in your work space then try with step by step process.

good luck

  • If this is the solution but when updating it gives errors in other libraries that are used in the old grandle example: https://stackoverflow.com/questions/62131564/a-failure-occurred-while-executing-org-jetbrains-kotlin-gradle-internal-kaptexec – Edwin Paz ss. - Aug 31 '21 at 13:42
0

I was also faced with the above error. While I was doing some research, I saw the issue usually comes about when a project is opened with a lower jdk than the one used in or during project creation. In my case, I had Jdk 8 setup as the project's gradle java version. Updating the jdk to 11 solved it for me. To do this, go to File -> Project Structure -> Gradle Settings -> Gradle JDK -> If you do not have Java 11, Download JDK, select 11 and download to set it up. Then retry executing the project

Nickson
  • 101
  • 2
  • 4