Android Studio 3.2.1: Unfixable Gradle Error
I was trying to create a messaging feature for my application. However, I no longer have to create this feature and I don't know what code I need to delete so that these errors will no longer occur:
Gradle sync failed: Cannot resolve external dependency
com.google.gms:google-services:4.2.0 because no repositories are
defined. Required by: project : Consult IDE log for more details (Help
| Show Log) (504 ms)
Here's my gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.android.SPELFIT.profile"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
dependencies {
implementation ('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0@aar'){
transitive=true
}
}
repositories {
jcenter()
}
android android-studio
add a comment |
I was trying to create a messaging feature for my application. However, I no longer have to create this feature and I don't know what code I need to delete so that these errors will no longer occur:
Gradle sync failed: Cannot resolve external dependency
com.google.gms:google-services:4.2.0 because no repositories are
defined. Required by: project : Consult IDE log for more details (Help
| Show Log) (504 ms)
Here's my gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.android.SPELFIT.profile"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
dependencies {
implementation ('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0@aar'){
transitive=true
}
}
repositories {
jcenter()
}
android android-studio
1
where is the error? we have to guess the error?
– Zaid Mirza
Nov 25 '18 at 5:08
@ZaidMirza Gradle sync failed: Cannot resolve external dependency com.google.gms:google-services:4.2.0 because no repositories are defined. Required by: project : Consult IDE log for more details (Help | Show Log) (504 ms)
– Cassandra Campbell
Nov 25 '18 at 6:01
add a comment |
I was trying to create a messaging feature for my application. However, I no longer have to create this feature and I don't know what code I need to delete so that these errors will no longer occur:
Gradle sync failed: Cannot resolve external dependency
com.google.gms:google-services:4.2.0 because no repositories are
defined. Required by: project : Consult IDE log for more details (Help
| Show Log) (504 ms)
Here's my gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.android.SPELFIT.profile"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
dependencies {
implementation ('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0@aar'){
transitive=true
}
}
repositories {
jcenter()
}
android android-studio
I was trying to create a messaging feature for my application. However, I no longer have to create this feature and I don't know what code I need to delete so that these errors will no longer occur:
Gradle sync failed: Cannot resolve external dependency
com.google.gms:google-services:4.2.0 because no repositories are
defined. Required by: project : Consult IDE log for more details (Help
| Show Log) (504 ms)
Here's my gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.android.SPELFIT.profile"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
dependencies {
implementation ('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0@aar'){
transitive=true
}
}
repositories {
jcenter()
}
android android-studio
android android-studio
edited Nov 25 '18 at 15:45
LundinCast
2,59341322
2,59341322
asked Nov 25 '18 at 4:40
Cassandra CampbellCassandra Campbell
84
84
1
where is the error? we have to guess the error?
– Zaid Mirza
Nov 25 '18 at 5:08
@ZaidMirza Gradle sync failed: Cannot resolve external dependency com.google.gms:google-services:4.2.0 because no repositories are defined. Required by: project : Consult IDE log for more details (Help | Show Log) (504 ms)
– Cassandra Campbell
Nov 25 '18 at 6:01
add a comment |
1
where is the error? we have to guess the error?
– Zaid Mirza
Nov 25 '18 at 5:08
@ZaidMirza Gradle sync failed: Cannot resolve external dependency com.google.gms:google-services:4.2.0 because no repositories are defined. Required by: project : Consult IDE log for more details (Help | Show Log) (504 ms)
– Cassandra Campbell
Nov 25 '18 at 6:01
1
1
where is the error? we have to guess the error?
– Zaid Mirza
Nov 25 '18 at 5:08
where is the error? we have to guess the error?
– Zaid Mirza
Nov 25 '18 at 5:08
@ZaidMirza Gradle sync failed: Cannot resolve external dependency com.google.gms:google-services:4.2.0 because no repositories are defined. Required by: project : Consult IDE log for more details (Help | Show Log) (504 ms)
– Cassandra Campbell
Nov 25 '18 at 6:01
@ZaidMirza Gradle sync failed: Cannot resolve external dependency com.google.gms:google-services:4.2.0 because no repositories are defined. Required by: project : Consult IDE log for more details (Help | Show Log) (504 ms)
– Cassandra Campbell
Nov 25 '18 at 6:01
add a comment |
3 Answers
3
active
oldest
votes
add google
repo.
repositories {
jcenter()
google()
}
I did that. But now in Android studio, it says updating indices and it just keeps buffering.
– Cassandra Campbell
Nov 25 '18 at 6:42
it will take time... it will download some of them.
– Zaid Mirza
Nov 25 '18 at 6:46
I am still getting the same error saying that the repositories are not defined.
– Cassandra Campbell
Nov 25 '18 at 6:48
add a comment |
Add google()
as the first repo for all your
buildscript {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
And
allprojects {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
See here https://stackoverflow.com/a/51151050/8034839
add a comment |
Cannot resolve external dependency
com.google.gms:google-services:4.2.0
Find project root build.gradle
file
buildscript {
repositories { // add this tag, if you don't have with repo
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
Hopefully you've proper net connection and make sure you've not checked Offline work in Global Gradle settings.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53464699%2fandroid-studio-3-2-1-unfixable-gradle-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
add google
repo.
repositories {
jcenter()
google()
}
I did that. But now in Android studio, it says updating indices and it just keeps buffering.
– Cassandra Campbell
Nov 25 '18 at 6:42
it will take time... it will download some of them.
– Zaid Mirza
Nov 25 '18 at 6:46
I am still getting the same error saying that the repositories are not defined.
– Cassandra Campbell
Nov 25 '18 at 6:48
add a comment |
add google
repo.
repositories {
jcenter()
google()
}
I did that. But now in Android studio, it says updating indices and it just keeps buffering.
– Cassandra Campbell
Nov 25 '18 at 6:42
it will take time... it will download some of them.
– Zaid Mirza
Nov 25 '18 at 6:46
I am still getting the same error saying that the repositories are not defined.
– Cassandra Campbell
Nov 25 '18 at 6:48
add a comment |
add google
repo.
repositories {
jcenter()
google()
}
add google
repo.
repositories {
jcenter()
google()
}
answered Nov 25 '18 at 6:30
Zaid MirzaZaid Mirza
1,61911123
1,61911123
I did that. But now in Android studio, it says updating indices and it just keeps buffering.
– Cassandra Campbell
Nov 25 '18 at 6:42
it will take time... it will download some of them.
– Zaid Mirza
Nov 25 '18 at 6:46
I am still getting the same error saying that the repositories are not defined.
– Cassandra Campbell
Nov 25 '18 at 6:48
add a comment |
I did that. But now in Android studio, it says updating indices and it just keeps buffering.
– Cassandra Campbell
Nov 25 '18 at 6:42
it will take time... it will download some of them.
– Zaid Mirza
Nov 25 '18 at 6:46
I am still getting the same error saying that the repositories are not defined.
– Cassandra Campbell
Nov 25 '18 at 6:48
I did that. But now in Android studio, it says updating indices and it just keeps buffering.
– Cassandra Campbell
Nov 25 '18 at 6:42
I did that. But now in Android studio, it says updating indices and it just keeps buffering.
– Cassandra Campbell
Nov 25 '18 at 6:42
it will take time... it will download some of them.
– Zaid Mirza
Nov 25 '18 at 6:46
it will take time... it will download some of them.
– Zaid Mirza
Nov 25 '18 at 6:46
I am still getting the same error saying that the repositories are not defined.
– Cassandra Campbell
Nov 25 '18 at 6:48
I am still getting the same error saying that the repositories are not defined.
– Cassandra Campbell
Nov 25 '18 at 6:48
add a comment |
Add google()
as the first repo for all your
buildscript {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
And
allprojects {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
See here https://stackoverflow.com/a/51151050/8034839
add a comment |
Add google()
as the first repo for all your
buildscript {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
And
allprojects {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
See here https://stackoverflow.com/a/51151050/8034839
add a comment |
Add google()
as the first repo for all your
buildscript {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
And
allprojects {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
See here https://stackoverflow.com/a/51151050/8034839
Add google()
as the first repo for all your
buildscript {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
And
allprojects {
repositories {
google() // must be the first one!!!!
jcenter()
}
}
See here https://stackoverflow.com/a/51151050/8034839
edited Nov 26 '18 at 5:00
answered Nov 26 '18 at 4:28
shizhenshizhen
3,11541232
3,11541232
add a comment |
add a comment |
Cannot resolve external dependency
com.google.gms:google-services:4.2.0
Find project root build.gradle
file
buildscript {
repositories { // add this tag, if you don't have with repo
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
Hopefully you've proper net connection and make sure you've not checked Offline work in Global Gradle settings.
add a comment |
Cannot resolve external dependency
com.google.gms:google-services:4.2.0
Find project root build.gradle
file
buildscript {
repositories { // add this tag, if you don't have with repo
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
Hopefully you've proper net connection and make sure you've not checked Offline work in Global Gradle settings.
add a comment |
Cannot resolve external dependency
com.google.gms:google-services:4.2.0
Find project root build.gradle
file
buildscript {
repositories { // add this tag, if you don't have with repo
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
Hopefully you've proper net connection and make sure you've not checked Offline work in Global Gradle settings.
Cannot resolve external dependency
com.google.gms:google-services:4.2.0
Find project root build.gradle
file
buildscript {
repositories { // add this tag, if you don't have with repo
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
Hopefully you've proper net connection and make sure you've not checked Offline work in Global Gradle settings.
answered Nov 26 '18 at 5:32
AryanAryan
15.1k73348
15.1k73348
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53464699%2fandroid-studio-3-2-1-unfixable-gradle-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
where is the error? we have to guess the error?
– Zaid Mirza
Nov 25 '18 at 5:08
@ZaidMirza Gradle sync failed: Cannot resolve external dependency com.google.gms:google-services:4.2.0 because no repositories are defined. Required by: project : Consult IDE log for more details (Help | Show Log) (504 ms)
– Cassandra Campbell
Nov 25 '18 at 6:01