Unsupported method: AndroidProject.getVariantNames()
I just updated to Android Studio 3.4 Canary 5. Then I open my existing project (which work perfectly on Android Studio 3.3 beta) and receive this error:
ERROR: Unsupported method: AndroidProject.getVariantNames().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
Full clean & rebuild, Invalidate cache & restart, re-import project does not work.
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip
build.gradle (project level):
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
About Android Studio
Android Studio 3.4 Canary 5
Build #AI-183.4284.36.34.5141831, built on November 20, 2018
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-39-generic
Anyone knows how to resolve this problem? Thank you.
add a comment |
I just updated to Android Studio 3.4 Canary 5. Then I open my existing project (which work perfectly on Android Studio 3.3 beta) and receive this error:
ERROR: Unsupported method: AndroidProject.getVariantNames().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
Full clean & rebuild, Invalidate cache & restart, re-import project does not work.
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip
build.gradle (project level):
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
About Android Studio
Android Studio 3.4 Canary 5
Build #AI-183.4284.36.34.5141831, built on November 20, 2018
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-39-generic
Anyone knows how to resolve this problem? Thank you.
1
How about updatingdistributionUrltodistributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip?
– nimi0112
Nov 27 '18 at 13:49
add a comment |
I just updated to Android Studio 3.4 Canary 5. Then I open my existing project (which work perfectly on Android Studio 3.3 beta) and receive this error:
ERROR: Unsupported method: AndroidProject.getVariantNames().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
Full clean & rebuild, Invalidate cache & restart, re-import project does not work.
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip
build.gradle (project level):
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
About Android Studio
Android Studio 3.4 Canary 5
Build #AI-183.4284.36.34.5141831, built on November 20, 2018
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-39-generic
Anyone knows how to resolve this problem? Thank you.
I just updated to Android Studio 3.4 Canary 5. Then I open my existing project (which work perfectly on Android Studio 3.3 beta) and receive this error:
ERROR: Unsupported method: AndroidProject.getVariantNames().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
Full clean & rebuild, Invalidate cache & restart, re-import project does not work.
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip
build.gradle (project level):
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
About Android Studio
Android Studio 3.4 Canary 5
Build #AI-183.4284.36.34.5141831, built on November 20, 2018
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-39-generic
Anyone knows how to resolve this problem? Thank you.
asked Nov 27 '18 at 10:59
nhoxbypassnhoxbypass
3,47851843
3,47851843
1
How about updatingdistributionUrltodistributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip?
– nimi0112
Nov 27 '18 at 13:49
add a comment |
1
How about updatingdistributionUrltodistributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip?
– nimi0112
Nov 27 '18 at 13:49
1
1
How about updating
distributionUrl to distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip ?– nimi0112
Nov 27 '18 at 13:49
How about updating
distributionUrl to distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip ?– nimi0112
Nov 27 '18 at 13:49
add a comment |
3 Answers
3
active
oldest
votes
Finally I found out how to make things work again.
Try change to use distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip in gradle-wrapper.properties
And classpath 'com.android.tools.build:gradle:3.2.1' in build.gradle (project level).
1
seem to be an issue with the new version of Android Studio
– SeanDp32
Jan 15 at 16:10
@SeanDp32 sure, hope Google will fix it soon
– nhoxbypass
Jan 16 at 3:36
Same here! I tied the solution in this post an my project worked fine. I don't know why. but if anyone have this problem this is the solution
– SeanDp32
Jan 16 at 19:13
@SeanDp32 I think because the new Android Studio required newer Gradle build tools to work, but the way Google force us to upgrade it is not good.
– nhoxbypass
Jan 18 at 2:53
1
Oh I see I been receiving messages telling me to upgrade gradle and I kept putting it off. That make sense now.
– SeanDp32
Jan 19 at 12:37
add a comment |
Disable settings > Experimental > Only sync active variant
3
From Review: Hi, this post does not seem to provide a quality answer to the question. Please either edit your answer and improve it, or just post it as a comment.
– sɐunıɔןɐqɐp
Jan 23 at 11:34
This was exactly the correct answer in my case, why is it not a quality answer? Unlike the other answers, this one doesn't require modifying the project being opened, which is preferable in many situations. If you feel it deserves more context why not add that yourself?
– Selali Adobor
Feb 21 at 14:59
add a comment |
Got the same error message after upgrading to Android Studio 3.3 and reloading an older project which was using an earlier version of Gradle. I fixed my project by changing the following line in the existing project level gradle.build file
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
In addition I had also removed some older SDKs and needed to set a Project level SDK in 'Open Module Settings'.
After these two changes the messages changed and included some auto fix links which got my project back up and running as usual.
ERROR: Minimum supported Gradle version is 4.10.1. Current version is
4.4.
Please fix the project's Gradle settings.
Fix Gradle wrapper and re-import project 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%2f53498161%2funsupported-method-androidproject-getvariantnames%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
Finally I found out how to make things work again.
Try change to use distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip in gradle-wrapper.properties
And classpath 'com.android.tools.build:gradle:3.2.1' in build.gradle (project level).
1
seem to be an issue with the new version of Android Studio
– SeanDp32
Jan 15 at 16:10
@SeanDp32 sure, hope Google will fix it soon
– nhoxbypass
Jan 16 at 3:36
Same here! I tied the solution in this post an my project worked fine. I don't know why. but if anyone have this problem this is the solution
– SeanDp32
Jan 16 at 19:13
@SeanDp32 I think because the new Android Studio required newer Gradle build tools to work, but the way Google force us to upgrade it is not good.
– nhoxbypass
Jan 18 at 2:53
1
Oh I see I been receiving messages telling me to upgrade gradle and I kept putting it off. That make sense now.
– SeanDp32
Jan 19 at 12:37
add a comment |
Finally I found out how to make things work again.
Try change to use distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip in gradle-wrapper.properties
And classpath 'com.android.tools.build:gradle:3.2.1' in build.gradle (project level).
1
seem to be an issue with the new version of Android Studio
– SeanDp32
Jan 15 at 16:10
@SeanDp32 sure, hope Google will fix it soon
– nhoxbypass
Jan 16 at 3:36
Same here! I tied the solution in this post an my project worked fine. I don't know why. but if anyone have this problem this is the solution
– SeanDp32
Jan 16 at 19:13
@SeanDp32 I think because the new Android Studio required newer Gradle build tools to work, but the way Google force us to upgrade it is not good.
– nhoxbypass
Jan 18 at 2:53
1
Oh I see I been receiving messages telling me to upgrade gradle and I kept putting it off. That make sense now.
– SeanDp32
Jan 19 at 12:37
add a comment |
Finally I found out how to make things work again.
Try change to use distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip in gradle-wrapper.properties
And classpath 'com.android.tools.build:gradle:3.2.1' in build.gradle (project level).
Finally I found out how to make things work again.
Try change to use distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip in gradle-wrapper.properties
And classpath 'com.android.tools.build:gradle:3.2.1' in build.gradle (project level).
answered Nov 28 '18 at 4:10
nhoxbypassnhoxbypass
3,47851843
3,47851843
1
seem to be an issue with the new version of Android Studio
– SeanDp32
Jan 15 at 16:10
@SeanDp32 sure, hope Google will fix it soon
– nhoxbypass
Jan 16 at 3:36
Same here! I tied the solution in this post an my project worked fine. I don't know why. but if anyone have this problem this is the solution
– SeanDp32
Jan 16 at 19:13
@SeanDp32 I think because the new Android Studio required newer Gradle build tools to work, but the way Google force us to upgrade it is not good.
– nhoxbypass
Jan 18 at 2:53
1
Oh I see I been receiving messages telling me to upgrade gradle and I kept putting it off. That make sense now.
– SeanDp32
Jan 19 at 12:37
add a comment |
1
seem to be an issue with the new version of Android Studio
– SeanDp32
Jan 15 at 16:10
@SeanDp32 sure, hope Google will fix it soon
– nhoxbypass
Jan 16 at 3:36
Same here! I tied the solution in this post an my project worked fine. I don't know why. but if anyone have this problem this is the solution
– SeanDp32
Jan 16 at 19:13
@SeanDp32 I think because the new Android Studio required newer Gradle build tools to work, but the way Google force us to upgrade it is not good.
– nhoxbypass
Jan 18 at 2:53
1
Oh I see I been receiving messages telling me to upgrade gradle and I kept putting it off. That make sense now.
– SeanDp32
Jan 19 at 12:37
1
1
seem to be an issue with the new version of Android Studio
– SeanDp32
Jan 15 at 16:10
seem to be an issue with the new version of Android Studio
– SeanDp32
Jan 15 at 16:10
@SeanDp32 sure, hope Google will fix it soon
– nhoxbypass
Jan 16 at 3:36
@SeanDp32 sure, hope Google will fix it soon
– nhoxbypass
Jan 16 at 3:36
Same here! I tied the solution in this post an my project worked fine. I don't know why. but if anyone have this problem this is the solution
– SeanDp32
Jan 16 at 19:13
Same here! I tied the solution in this post an my project worked fine. I don't know why. but if anyone have this problem this is the solution
– SeanDp32
Jan 16 at 19:13
@SeanDp32 I think because the new Android Studio required newer Gradle build tools to work, but the way Google force us to upgrade it is not good.
– nhoxbypass
Jan 18 at 2:53
@SeanDp32 I think because the new Android Studio required newer Gradle build tools to work, but the way Google force us to upgrade it is not good.
– nhoxbypass
Jan 18 at 2:53
1
1
Oh I see I been receiving messages telling me to upgrade gradle and I kept putting it off. That make sense now.
– SeanDp32
Jan 19 at 12:37
Oh I see I been receiving messages telling me to upgrade gradle and I kept putting it off. That make sense now.
– SeanDp32
Jan 19 at 12:37
add a comment |
Disable settings > Experimental > Only sync active variant
3
From Review: Hi, this post does not seem to provide a quality answer to the question. Please either edit your answer and improve it, or just post it as a comment.
– sɐunıɔןɐqɐp
Jan 23 at 11:34
This was exactly the correct answer in my case, why is it not a quality answer? Unlike the other answers, this one doesn't require modifying the project being opened, which is preferable in many situations. If you feel it deserves more context why not add that yourself?
– Selali Adobor
Feb 21 at 14:59
add a comment |
Disable settings > Experimental > Only sync active variant
3
From Review: Hi, this post does not seem to provide a quality answer to the question. Please either edit your answer and improve it, or just post it as a comment.
– sɐunıɔןɐqɐp
Jan 23 at 11:34
This was exactly the correct answer in my case, why is it not a quality answer? Unlike the other answers, this one doesn't require modifying the project being opened, which is preferable in many situations. If you feel it deserves more context why not add that yourself?
– Selali Adobor
Feb 21 at 14:59
add a comment |
Disable settings > Experimental > Only sync active variant
Disable settings > Experimental > Only sync active variant
answered Jan 23 at 11:25
kpprokppro
411
411
3
From Review: Hi, this post does not seem to provide a quality answer to the question. Please either edit your answer and improve it, or just post it as a comment.
– sɐunıɔןɐqɐp
Jan 23 at 11:34
This was exactly the correct answer in my case, why is it not a quality answer? Unlike the other answers, this one doesn't require modifying the project being opened, which is preferable in many situations. If you feel it deserves more context why not add that yourself?
– Selali Adobor
Feb 21 at 14:59
add a comment |
3
From Review: Hi, this post does not seem to provide a quality answer to the question. Please either edit your answer and improve it, or just post it as a comment.
– sɐunıɔןɐqɐp
Jan 23 at 11:34
This was exactly the correct answer in my case, why is it not a quality answer? Unlike the other answers, this one doesn't require modifying the project being opened, which is preferable in many situations. If you feel it deserves more context why not add that yourself?
– Selali Adobor
Feb 21 at 14:59
3
3
From Review: Hi, this post does not seem to provide a quality answer to the question. Please either edit your answer and improve it, or just post it as a comment.
– sɐunıɔןɐqɐp
Jan 23 at 11:34
From Review: Hi, this post does not seem to provide a quality answer to the question. Please either edit your answer and improve it, or just post it as a comment.
– sɐunıɔןɐqɐp
Jan 23 at 11:34
This was exactly the correct answer in my case, why is it not a quality answer? Unlike the other answers, this one doesn't require modifying the project being opened, which is preferable in many situations. If you feel it deserves more context why not add that yourself?
– Selali Adobor
Feb 21 at 14:59
This was exactly the correct answer in my case, why is it not a quality answer? Unlike the other answers, this one doesn't require modifying the project being opened, which is preferable in many situations. If you feel it deserves more context why not add that yourself?
– Selali Adobor
Feb 21 at 14:59
add a comment |
Got the same error message after upgrading to Android Studio 3.3 and reloading an older project which was using an earlier version of Gradle. I fixed my project by changing the following line in the existing project level gradle.build file
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
In addition I had also removed some older SDKs and needed to set a Project level SDK in 'Open Module Settings'.
After these two changes the messages changed and included some auto fix links which got my project back up and running as usual.
ERROR: Minimum supported Gradle version is 4.10.1. Current version is
4.4.
Please fix the project's Gradle settings.
Fix Gradle wrapper and re-import project Gradle settings
add a comment |
Got the same error message after upgrading to Android Studio 3.3 and reloading an older project which was using an earlier version of Gradle. I fixed my project by changing the following line in the existing project level gradle.build file
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
In addition I had also removed some older SDKs and needed to set a Project level SDK in 'Open Module Settings'.
After these two changes the messages changed and included some auto fix links which got my project back up and running as usual.
ERROR: Minimum supported Gradle version is 4.10.1. Current version is
4.4.
Please fix the project's Gradle settings.
Fix Gradle wrapper and re-import project Gradle settings
add a comment |
Got the same error message after upgrading to Android Studio 3.3 and reloading an older project which was using an earlier version of Gradle. I fixed my project by changing the following line in the existing project level gradle.build file
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
In addition I had also removed some older SDKs and needed to set a Project level SDK in 'Open Module Settings'.
After these two changes the messages changed and included some auto fix links which got my project back up and running as usual.
ERROR: Minimum supported Gradle version is 4.10.1. Current version is
4.4.
Please fix the project's Gradle settings.
Fix Gradle wrapper and re-import project Gradle settings
Got the same error message after upgrading to Android Studio 3.3 and reloading an older project which was using an earlier version of Gradle. I fixed my project by changing the following line in the existing project level gradle.build file
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
In addition I had also removed some older SDKs and needed to set a Project level SDK in 'Open Module Settings'.
After these two changes the messages changed and included some auto fix links which got my project back up and running as usual.
ERROR: Minimum supported Gradle version is 4.10.1. Current version is
4.4.
Please fix the project's Gradle settings.
Fix Gradle wrapper and re-import project Gradle settings
answered Jan 23 at 12:26
Frost MetohFrost Metoh
464
464
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%2f53498161%2funsupported-method-androidproject-getvariantnames%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
How about updating
distributionUrltodistributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip?– nimi0112
Nov 27 '18 at 13:49