-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not resolve com.android.tools.build:gradle:3.1.2. #22470
Comments
|
|
please help😓😓😓 |
Is this the same with a new project after |
@zoechi it is:
I have tried installing different version of gradle, messing with the gradle props. Been trying to run the "helloworld" app on my lunch breaks and still can't get the thing to work. Any ideas? |
I tried this as well: #21600 No luck. If anyone has a temporary workaround - I would be very grateful |
Worked for me by adding mavenCentral() and gradle plugin version 3.2.0 in flutter_app\android\build.gradle:
And gradle version 4.6 in flutter_app\android\gradle\wrapper\gradle-wrapper.properties:
|
Still no luck - I ended up just using a linux distro to develop in. |
|
Final solve this
#add maven { url 'https://maven.google.com' } this to your build.gradle file |
Still no luck
|
same issue here.
Android studio 3.2
|
adding mavenCentral() does the trick |
solved this. |
solved too by shutdown shadowsocks. |
How did you do it? |
I am having this issue as well. Occurs when I run I have Gradle 4.10.2 and Flutter 1.0.0 |
I'm having this problem as well, apparently the |
@dev-mush Try changing it to |
I have the same issue. I have tried several proposition but did not solve my problem. |
Downloaded gradle 4.11.1 issue fixed |
upgrading gradle would solve the issue |
same issue, after upgrade android studio and flutter sdk. then I begin to check the old versions of gradle in .gradle/wrapper/dists (because I solved another problem in this way when I set up flutter sdk the first time). note that plugin version may also need to change, I set it to an old version I used(3.1.2), |
|
I get this error while running my flutter project that uses google maps API. There is no problem running the first app from docs.
I have tried every workaround I came across. :( |
One thing that I was missing was the gradle bin path in my System Variables. I had it only in my user variable PATH. |
I just created the app and tried to run the app for the first time. Got the same error:
What I have tried
None of the options above worked. But, I have some doubts about @JokerHYC's answare. I'm using and corporate network, so it probably can be an proxy issue.
Can anyone explain better how I can do this? |
Installing gradle itself solved my issue.
|
Who knows the right answer, I am in this trouble. |
any tips, I am stuck on this |
This answers solved mine #22470 (comment). So, change your network and try another |
Hi guys, I have encountered the same problem. How did I solve it? The root cause is corporate firewall. You need to set proxy in gradle.properties, like this:
In addition, make sure your JAVA_HOME is set to Java 1.8 home. update sdkmanager
accept all android licenses:
finally, validate
Good luck. |
I tried changing the files like some suggested but still had problems. I upgraded gradle and it's now working like a charm |
Tried everything in this thread and nothing worked. I Started getting a lot of gradle issues after splitting the apk (would not recommend) but it could also be from migrating to androidx :( |
For Iranian people: We need use proxy or VPN to building app. |
It might be useful to add a doctor check that verifies that a user can connect to all the hosts the flutter tool depends on. Either directly or indirectly. Some examples: the pub host, GCP bucket, Google Maven, cocoapod server and so on. Any objection or concern @timsneath, @tvolkert, @zanderso ? |
Adding that check to the doctor sgtm. Could you go ahead and file an issue for that and we can track it in the doctor project. Thanks! |
Now that the tracking issue has been filled, I'm going to close this one |
Solved by disable the http and https socks proxy. I used a VPN instead |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
The text was updated successfully, but these errors were encountered: