Issue
I'm beginner for flutter. After coding something I want to simulate codes for Android emulator. I could run successfully a few days ago but today I can't. Error code says unable to find package java.lang. I didn't find where I should look for find problem. SDK path is correct, flutter doctor didn't find any problem. Also I can run project with iOS emulator. I am working on MacOS. Here whole error information.
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':location:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 7s
Gradle task assembleDebug failed with exit code 1
Solution
Main problem is about packages. Some of them needs android migrate to androidx. When project migrated androidx, problem is solved.
Answered By - Berkay Oruç
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.