Error creating android studio 2.3 project

Asked 2 years ago, Updated 2 years ago, 85 views

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

android android-studio

2022-09-30 16:16

1 Answers

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.

Add after receiving comments

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" 
        }
    }
}

Solving Similar Errors

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).

Resolution Case for Home SO


2022-09-30 16:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.