Skip to content
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

Something is wrong with Gradle #37391

Closed
DoryFazna opened this issue Aug 1, 2019 · 16 comments
Closed

Something is wrong with Gradle #37391

DoryFazna opened this issue Aug 1, 2019 · 16 comments

Comments

@DoryFazna
Copy link

OKay... Im new to flutter and android studio as well..
Now my problem is,
Say if I'm gonna open a ' New Flutter project ',
The project opens successfully.
but when I go to 'build.gradle' in app directory, It shows 2 errors.

  1. Cannot resolve symbol 'properties'
  2. Cannot resolve symbol 'GradleException'
    (displayed in the screenshot below..)
    image
    and the same error is in 'settings.gradle' file too..
    issue2

But when i run it, It shows no errors.
I've completed learning basic front end development stuffs, That error did not affect anything when learning those. But I need to clear this error to start connecting flutter with firebase.

flutter doctor - no issues

I think something is wrong with gradle.
Please help !

@SirJohn2024
Copy link

When you open a .gradle file in a Flutter project, Andropid Studio should display "Open for Editing in Android Studio" on the top right of the window.
That should open the Android gradle project and there you could do all the checks, the Flutter side is stupid at the moment... ;-)

@DoryFazna
Copy link
Author

Yess.. When I open it by clicking "Open for Editing in Android Studio" , error is not visible..

@longravuth
Copy link

This is kind of annoying. Will is be resolved soon?

@vinayraj010
Copy link

IMG_20191017_215533
how do i fix this error. which is in the project(android)/app/build.gradle

@abodamin
Copy link

anyone found solution for this?
I'm stuck here too since 3 days

@SirJohn2024
Copy link

I don't understand exactly the problem, but I think you should start upgrading the plugins version, as suggested by Android Studio:


buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

Gradle plugin should have the same version of Android Studio, 3.5.1 if you're on the latest build, otherwise upgrade it...

@vinayraj010
Copy link

This thing is not working changed to the same version.
PFA

Screenshot

@daniele777
Copy link

daniele777 commented Nov 11, 2019

Do you had running flutter doctor ???? i discover some issue

@kys2545
Copy link

kys2545 commented Dec 11, 2019

I have same problem. I get this error because I edit android module without open it first using AS in another tab (Tools -> Flutter -> Open Android module..). Then I have a solution, just restart and kill the chache in your Android Studio (File -> Invalidate Chache / Restart).

It fixed for me, I hope you too

#29608 (comment)

@pdaniel37
Copy link

same problem here, it's help me: #29608 2nd solution comment

@abodamin
Copy link

anyone found solution for this?
I'm stuck here too since 3 days

I found the solution by updating the Gradle to latest version I think 5.2.X not sure, Flutter by default comes with gradle verstion 4.X.X just updated it to latest version and then found another some Kotlin error apeared after that u can solve it by copying it to Stack Overflow easily and that was pretty much everything.

"Just Update gradle and its plugins"

@zyllus17
Copy link

If it still doesn't work,then check this

#29608 (comment)

@TungLam111
Copy link

anyone found solution for this?
I'm stuck here too since 3 days

have you solved it? please guide me

@shariar41
Copy link

Replace GradleException(...) with FileNotFoundException(..) in the build.gradle in your app directory, the error(Cannot resolve symbol 'GradleException') disappeared in my case

@radeksvarz
Copy link

Replace GradleException(...) with FileNotFoundException(..) in the build.gradle in your app directory, the error(Cannot resolve symbol 'GradleException') disappeared in my case

Did not help in my case. Any kind of exception is having this issue.

@github-actions
Copy link

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 flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests