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

App does not run on phone emulator #85506

Closed
Bicentricnote33 opened this issue Jun 29, 2021 · 2 comments
Closed

App does not run on phone emulator #85506

Bicentricnote33 opened this issue Jun 29, 2021 · 2 comments
Labels
r: invalid Issue is closed as not valid

Comments

@Bicentricnote33
Copy link

I just downloaded flutter on android studio, and there's a demo app. However, I cant run the demo app.
I downloaded the Pixel 3 XL api 28
after opening the phone, when i press the green run button, i get this error:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x7a7153) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x7a7153

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 3s
Exception: Gradle task assembleDebug failed with exit code 1

im not sure what this means, please help!

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Jun 29, 2021
@darshankawar
Copy link
Member

The error is:

java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x7a7153) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x7a7153

It seems the gradle version you are using isn't yet compatible and hence throwing the error. Try downgrading the gradle version which hopefully should resolve your issue.
See these similar issues: gradle/gradle#15538. gradle/gradle#16641 (comment)

Also, this doesn't seem to be framework issue, but maybe coming from gradle, so if you still face any issue, please file it here: https://github.com/gradle/gradle/issues or ask support questions on StackOverflow.

Closing from here.

@darshankawar darshankawar added r: invalid Issue is closed as not valid and removed in triage Presently being triaged by the triage team labels Jun 29, 2021
@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 Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: invalid Issue is closed as not valid
Projects
None yet
Development

No branches or pull requests

2 participants