0

Hello I am generating signed apk from Android Studio. But when i try to generate it gives me error. can any one help me to solve this?

Error

enter image description here

Aditya Vyas-Lakhan
  • 13,409
  • 16
  • 61
  • 96
  • https://stackoverflow.com/a/21351122/3395198 – IntelliJ Amiya Nov 29 '17 at 05:39
  • @IntelliJAmiya right now there is use embedded checkbox selected and under that it has this path C:\Program Files\Android\Android Studio1\jre – Aditya Vyas-Lakhan Nov 29 '17 at 06:00
  • Maybe you've already installed Java and JAVA_HOME path is pointing to `C:\Program Files\Java\bin`. So uncheck default JRE path and set it to `C:\Program Files\Java\bin` in Android Studio like Intellij Amiya pointed out. – Shashanth Nov 29 '17 at 06:08
  • @IntelliJAmiya i solved it as you said.. but now its giving error in apk generate.. Error:A problem was found with the configuration of task ':app:packageRelease'. > File 'E:\Android_Project\BPC\BPC\app\build\intermediates\res\resources-release-stripped.ap_' specified for property 'resourceFile' does not exist. – Aditya Vyas-Lakhan Nov 29 '17 at 06:55
  • add `shrinkResources false` – IntelliJ Amiya Nov 29 '17 at 06:56
  • and what about minify? true or false? seems like 2.3.3 is buggy – Aditya Vyas-Lakhan Nov 29 '17 at 07:00

1 Answers1

1

I found solution. First i reinstall the updated jdk and jre and then restart. and then copy keytool.exe to path and then change as per @IntelliJ Amiya suggested in comment. Now it works fine for me.

Aditya Vyas-Lakhan
  • 13,409
  • 16
  • 61
  • 96