Today, without warning, Android Studio has had another gust, spent most of the day trying many solutions on the Internet, and finally solved the problem. Let's go step by step.
Step 1: This is the first bug
Error:Failed to resolve: com.android.support:support-annotations:27.0.1
Install Repository and sync project
Open File
Show in Project Structure dialog
Error:Failed to resolve: com.android.support:appcompat-v7:27.0.1
Install Repository and sync project
Open File
Show in Project Structure dialog
This problem can be solved by modifying the gradle of the project to add maven {url“ https://maven.google.com ”} That's it, as shown in the figure.
At the same time, open SDK Manager
Check whether repository has been downloaded and installed
Step 2: The problem is still unsolved, even if the error is reported, just be used to it.
Error:A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
Could not find com.android.support:appcompat-v7:27.0.1.
Required by:
MakerOnly0818:app:unspecified
MakerOnly0818:app:unspecified > com.gyf.barlibrary:barlibrary:2.1.4
MakerOnly0818:app:unspecified > MakerOnly0818:imagepicker:unspecified
Could not find com.android.support:appcompat-v7:27.0.1.
Required by:
MakerOnly0818:app:unspecified > com.roughike:bottom-bar:1.3.4
Could not find com.android.support:appcompat-v7:27.0.1.
Required by:
MakerOnly0818:app:unspecified > com.bigkoo:convenientbanner:2.0.5
Could not find com.android.support:appcompat-v7:27.0.1.
Required by:
MakerOnly0818:app:unspecified > com.zhy:flowlayout-lib:1.0.3
Could not find com.android.support:support-v4:27.0.1.
Required by:
MakerOnly0818:app:unspecified > MakerOnly0818:slidingmenu:unspecified
Could not find com.android.support:appcompat-v7:27.0.1.
Required by:
MakerOnly0818:app:unspecified > cn.yipianfengye.android:zxing-library:2.2
Could not find com.android.support:support-v4:27.0.1.
Required by:
MakerOnly0818:app:unspecified > cn.yipianfengye.android:zxing-library:2.2
Could not find com.android.support:appcompat-v7:27.0.1.
Required by:
MakerOnly0818:app:unspecified > me.weyye.hipermission:library:1.0.3
Could not find com.android.support:appcompat-v7:27.0.1.
Required by:
MakerOnly0818:app:unspecified > MakerOnly0818:NIM_Android_UIKit-master:unspecified
MakerOnly0818:app:unspecified > MakerOnly0818:NIM_Android_UIKit-master:unspecified > com.android.support:design:25.0.1
Could not find com.android.support:support-v4:27.0.1.
Required by:
MakerOnly0818:app:unspecified > com.twitter.sdk.android:tweet-ui:3.1.0
MakerOnly0818:app:unspecified > com.twitter.sdk.android:twitter-mopub:3.1.0 > com.mopub:mopub-sdk:4.11.0
MakerOnly0818:app:unspecified > com.twitter.sdk.android:twitter-mopub:3.1.0 > com.mopub:mopub-sdk:4.11.0 > com.mopub:mopub-sdk-base:4.11.0
MakerOnly0818:app:unspecified > com.twitter.sdk.android:twitter-mopub:3.1.0 > com.mopub:mopub-sdk:4.11.0 > com.mopub:mopub-sdk-banner:4.11.0
MakerOnly0818:app:unspecified > com.twitter.sdk.android:twitter-mopub:3.1.0 > com.mopub:mopub-sdk:4.11.0 > com.mopub:mopub-sdk-interstitial:4.11.0
MakerOnly0818:app:unspecified > com.twitter.sdk.android:twitter-mopub:3.1.0 > com.mopub:mopub-sdk:4.11.0 > com.mopub:mopub-sdk-rewardedvideo:4.11.0
MakerOnly0818:app:unspecified > com.twitter.sdk.android:twitter-mopub:3.1.0 > com.mopub:mopub-sdk:4.11.0 > com.mopub:mopub-sdk-native-static:4.11.0
MakerOnly0818:app:unspecified > com.twitter.sdk.android:twitter-mopub:3.1.0 > com.mopub:mopub-sdk:4.11.0 > com.mopub:mopub-sdk-native-video:4.11.0
//This problem can be solved by annotating the Android Test Compile part of the module's gradle.
The third step:Then the problem broke out again. The problem has been improved and the information of error reporting is getting fewer and fewer. Ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-
Error:(15, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
//With an answer to the link below, stack overflow may not be able to open. Let me introduce it below: Figure 1 is the solution.
https://stackoverflow.com/questions/45301203/no-resource-found-that-matches-the-given-name-attr-androidkeyboardnavigationc/45307273
Of
Simply put, modify the gradle of module
1. Change compileSdkVersion to 26
2. Build Tools Version to "26.0.1"
3. Compoile'com.android.support:appcompat-v7:26.0.1'replaces the previous version
4.sync will be prompted to download the update, and the problem will be solved after completion.
Although the problem has been solved, maybe the solution is not omnipotent. If there are other problems that can not be solved, you are welcome to comment. At the same time, qq group 492462202 welcomes exchanges. If you feel helpful, sponsor it.