Error: as shown in the figure
Some methods in mianactivity will report errors:
At the beginning, I thought that the SDK was faulty, because I always thought that my SDK was not installed properly. Then I repeatedly installed Android studio. Those who included the SDK and didn’t package the SDK came several times, and I repeatedly installed the SDK (this is a sad story) Finally, with the help of Baidu boss, we can solve this problem
Solution:
1. Open build.gradle
2. Replace the release method comment with “repositories {maven {URL” https://maven.google.com “}” is as follows:
3、clean project
The solution effect is as follows:
Read More:
- Failed to resolve: com.android.support:appcompat-v7:25.3.0
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- Android studio failed to resolve: junit:junit : 4.12 solutions
- Failed to find target with hash string ‘android-25’ in:D:\SDK
- Failed to find target with hash string”android-21″ in:D:\AndroidVersionSdk
- failed to resolve:com.github.********
- Failed to resolve: com.github
- As Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
- Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK
- Add multiple URLs to the Maven property of a gradle
- ERROR: Unsupported method: AndroidProject.getVariantNames().
- Idea about module is not backed by gradle
- Solve gradle project refresh failed
- ERROR Unsupported method AndroidProject.getVariantNames().
- Sync with Gradle for project ‘XXXX‘ failed: Connection timed out: connect
- AndroidStudio sync failed solution
- Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.0.0:clean (default-clean) on
- How to Fix Android Error:This Gradle plugin requires Studio 3.0 minimum
- Solution of plugins error reporting in idea maven