2

my project was going great till i ran flutter clean and then tried to run my app on android,where i got this error

    FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

* 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 20s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
5
  • is it the output of flutter run (or flutter build) command? if so, tried adding -v switch? Commented Aug 17, 2019 at 6:02
  • flutter run command Commented Aug 17, 2019 at 6:04
  • what about -v? Commented Aug 17, 2019 at 6:06
  • running it with -v right now Commented Aug 17, 2019 at 6:08
  • 1
    solved it by updating my dependencies Commented Aug 17, 2019 at 6:33

2 Answers 2

0

This issue will most likely occur when the dependencies of your app is not compatible with your development environment.

On the following SO posts, the best solution for this error is to update the dependencies as also mentioned in the comment above. To backup the references, you can refer to this SO post that exhibits the issues encountered:

Sign up to request clarification or add additional context in comments.

Comments

0

None of the solutions worked for me, I created a new flutter project & copied files from my existing project. This worked.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.