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:
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- Failed to resolve: com.android.support:appcompat-v7:25.3.0
- Failed to resolve: com.android.support:appcompat-v7:27.
- [error log] 27.1.0 series of errors Error:Failed to resolve: com.android.support :support-an notations:27.1.0
- Android project error: could not resolve com.android.support .c onstraint:constraint-layout :2.0.2.
- Android studio failed to resolve: com.github.CymChad :BaseRecyclerViewAdap terHelper:2.9.46
- [error record] as compilation error (Android support plugin version is too high | upgrade Android studio to the latest version)
- Android studio failed to resolve: junit:junit : 4.12 solutions
- android studio:Error inflating class android.support.v4.widget.SwipeRefreshLayout
- Android Studio | Failed to find target with hash string ‘android-26’ in: D:\Android\sdk
- How to Fix com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
- Android Studio could not resolve resource
- Android Studio Series: after Android studio is opened, the project window will not be displayed.
- Solve Android studio connection dl.google.com Timeout problem
- [error record] kotlin code compilation error when Android studio compiles (process @ nonnull parameter when upgrading support library)
- When Android Studio runs the app, it prompts Error: Please select Android SDK
- Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process D:\….\0.jar
- Android studio AAPT: error: attribute android:requestLegacyExternalStorage not found.
- Error in Cordova project execution command after Android studio upgrade: could not find gradle wrapper within Android SDK
- Android Studio – add configuration for Android studio