The beginning of the matter is to export an APK with signature package and report an error Error:Execution failed for task ‘: app:compileReleaseJava ‘& gt; cannot find sys
At that time, my default setting location did not point to the correct JDK path, so an error was reported. Since I haven’t found my previous JDK for a long time, I went to the next version of JDK (9.0.4). Please pay attention to the latest version.
Then I try to export again and report an error: Error:Could not Determine java version from ‘9.0.4’
Then try again and continue to report errors Error:Gradle version 2.2 is required. Current version is 4.6. If using the gradle wrapper, try editing the distributionUrl in /Users//Desktop/gradle/wrapper/gradle- wrapper.properties to gradle-2.2- all.zip … because of the error caused by the inconsistency between the gradle version and the gradle version of as, modifying the gradle configuration file (there are many detailed solutions on the Internet) is of no use to me… Because after the change, an error is reported: could not initialize class com.android.repository . api.RepoManager Well, I gave up.
I began to think about why I encountered this series of problems at the beginning, right! Because of the latest version of JDK! So, I went to download a 1.8.0 JDK (download address), download and install it, change the JDK location of Android studio (Figure), and then gradle changed back to the old version, APK signature package export, success!!
So why should I download the latest JDK?：）
- android studio Error Gradle project sync failed. Please fix your project and try again
- As Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
- ERROR: Unsupported method: AndroidProject.getVariantNames().
- Error in Cordova project execution command after Android studio upgrade: could not find gradle wrapper within Android SDK
- ERROR Unsupported method AndroidProject.getVariantNames().
- Some processing experiences of failed to notify build listener
- How to Fix Android Error:This Gradle plugin requires Studio 3.0 minimum
- AndroidStudio sync failed solution
- Install of Android studio_ FAILED_ OLDER_ Solutions to SDK
- Import Android project Error:Internal error : org.gradle.tooling .BuildException: Could not execute build…
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- build.gradle Warming: cannot be applied to ‘(groovy.lang.Closure)’/'(java.lang.String)’
- Solve gradle project refresh failed
- Failed to find target with hash string ‘android-25’ in:D:\SDK
- Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process D:\….\0.jar
- Solution: unity package failed. Commandinvocationfailure: gradle build failed
- Android Error | Failed to find target with hash string ”android-23′ in…
- Sync with Gradle for project ‘XXXX‘ failed: Connection timed out: connect
- Execution failed for task ‘:app:processDebugManifest’