Gradle error in app:packageDebug, Android Studio, Ubuntu

后端 未结 2 1238
一向
一向 2021-01-13 08:19

I am trying to run a project in Android Studio on Ubuntu but it fails with the following error in gradle.

Error: Execution failed for task \':app:packageDebug\

相关标签:
2条回答
  • 2021-01-13 09:07

    Not sure if this totally applies, since you're running Ubuntu, but the same error on OSX was solved for me by changing the JRE that Android Studio was running under (following guidance from here: https://intellij-support.jetbrains.com/entries/23455956-Selecting-the-JDK-version-the-IDE-will-run-under)

    I set the JRE version that Android Studio runs under to 1.7.* by changing this in the Info.plist file on OSX:

    <key>JVMVersion</key>
    <string>1.7*</string>
    

    The version was confirmed in the "About" dialog. It changed from 1.6 to 1.7, and the BouncyCastle problem went away.

    0 讨论(0)
  • 2021-01-13 09:13

    I run into the same problem in osx.

    I clear the gradle files in ~/.gradle. Then reopen android studio, wait for download the gradle files, then everything is ok.

    0 讨论(0)
提交回复
热议问题