Issue
I have tried importing my project and even updated the android studio and Gradle. But I am not able to sync the Gradle with the project. Please help.
These are the error messages in the log- ERROR: Failed to resolve: com.android.support.constraint:constraint-layout:1.1.3 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: Failed to resolve: com.android.support:appcompat-v7:23.3.0 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: Failed to resolve: com.android.support:support-v4:23.3.0 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: Failed to resolve: com.android.support:design:23.3.0 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
And the error message in the event log- NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN
Solution
you need to add Google's Maven repository to your project's build.gradle file as described here: https://developer.android.com/topic/libraries/support-library/setup.html
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
For Android Studio 3.0.0 and above:
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
Answered By - Jaspalsinh Gohil
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.