Reputation: 25
I have updated my Android Studio version 3.0.1 but now created a small project but it shows me a lot of errors. How can I fix these?
Error:
Upvotes: 0
Views: 581
Reputation: 29814
You need to add google()
repository to your project (root) build.gradle
. Something like this:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
Then uncheck Offline work
option from File -> Setting -> Gradle
in Global Gradle settings (this maybe different in your OS. I'm using Linux).
Upvotes: 1
Reputation:
In the top there is a gradle sync error pop-up.Click on the 'Try Again' or 'sync Now'option.
If still not resolved, go to build option and rebuild project.
Upvotes: 0