Recently, AndroidStudio has encountered this problem for the first time running a project. I don’t know the specific reason, but the solution is as follows.
Add the following to your app’s build.gradle file under the Android TAB.
Add the following to your app’s build.gradle file under the Android TAB.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Read More:
- Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process D:\….\0.jar
- Android Studio Error: Invoke-customs are only supported starting with Android O (–min-api 26)
- Perfect solution Error:Execution failed for task ‘: APP:transformClassesWithDexForDebug ‘… Problem
- Solve gradle project refresh failed
- As Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
- How to Fix Android Error:This Gradle plugin requires Studio 3.0 minimum
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- android studio Error Gradle project sync failed. Please fix your project and try again
- ERROR Unsupported method AndroidProject.getVariantNames().
- Failed to find target with hash string”android-21″ in:D:\AndroidVersionSdk
- Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK
- AndroidStudio sync failed solution
- Failed to find target with hash string ‘android-25’ in:D:\SDK
- ERROR: Unsupported method: AndroidProject.getVariantNames().
- Error: package android.support.annotation Does not exist
- Error running app: Default Activity Not Found
- Failed to resolve: com.android.support:appcompat-v7:27.
- Import Android project Error:Internal error : org.gradle.tooling .BuildException: Could not execute build…
- failed to find Build Tools revision 23.0.2 Install Build Tools 23.0.2 and sync project
- Install of Android studio_ FAILED_ OLDER_ Solutions to SDK