Test drive on flutter: android.jar file not found

3,738

Solution 1

Image Please update your android sdk.

You don't have install api 28. Please open your android sdk and install android sdk 28.

Solution 2

This error might occur because of android.jar is in another folder

Try opening

C:\Users\XXXX\Appdata\Local\Android\sdk\platforms

and then look for a folder named android-29 or android-27 and you should be able to find android.jar in that folder just copy that file and paste it into to android-28

Share:
3,738
Admin
Author by

Admin

Updated on December 16, 2022

Comments

  • Admin
    Admin 11 months

    I'm just trying to run the first app and this is what happens:

    FAILURE: Build failed with an exception.

    • What went wrong: A problem was found with the configuration of task ':app:processDebugResources'.

      File 'C:\Users\XXXX\Appdata\Local\Android\sdk\platforms\android-28\android.jar' specified for property 'androidJar' does not exist.

    • 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 15s Gradle task assembleDebug failed with exit code 1 Exited (sigterm)

    The file is on the android-29 folder! what should I do?

  • Shashank Pandey
    Shashank Pandey almost 2 years
    This answer worked for me.