When creating a project with Android Studio 2.3, the following error occurred, so please let me know the meaning and countermeasures of the error.
C:\Users\vaiot\AndroidStudioProjects\MyApplication3\app\build.gradle
Error: (26,13) Failed to resolve: com.android.support:appcompat-v7:27.+
Install Repository and sync project
Show in File
Show in Project Structure dialog
This error means that support library is not included in the standard Android package.
Support libraries are often added for backward compatibility with new features or for adding UI elements.
appcompat-v7 is written in build.gradle
for backward compatibility, but has it been downloaded?
To download to a development terminal, follow the Set up the Support Library procedure.
If you have already taken this step and still experience errors during build, please update it.
I'm sorry for the reply that includes speculation because I don't have the environment.
Try adding maven{...}
below to the build.gradle of the project (directly below the root) to see if it is resolved.
allprojects{
repositories {
jcenter()
maven{
url "https://maven.google.com"
}
}
}
The repository of the support library version 26.0.0 or later has been changed and appears to be used from Google's Maven repository (https://maven.google.com.
Now edit the build.gradle of the project (just below the root).
© 2024 OneMinuteCode. All rights reserved.