skip to Main Content

I’m a noob with this, so thanks in advance if you answer.
I’m trying to run a project, just to emulate it, but it’s been impossible

This is the first issue that I have
[{
    "resource": "/C:/src/flutter/appstic/stickerbakeai-main-app/StickerBakeAI/android/",
    "owner": "_generated_diagnostic_collection_name_#5",
    "code": "0",
    "severity": 8,
    "message": "The supplied phased action failed with an exception.rnCould not create task ':generateLockfiles'.rnProcess 'command 'C:\src\flutter\appstic\stickerbakeai-main-app\StickerBakeAI\android/gradlew.bat'' finished with non-zero exit value 1",
    "source": "Java",
    "startLineNumber": 1,
    "startColumn": 1,
    "endLineNumber": 1,
    "endColumn": 1
}]

Not sure if this related with flutter run issue. But even ignoring this, I run it and I got this

Launching libmain.dart on Android SDK built for x86 in debug mode...
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the chat were released at different times.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':package_info_plus:compileDebugJavaWithJavac'.
> Could not determine the dependencies of null.
   > Cannot query the value of this provider because it has no value available.

Don’t understand where is the issue
My local properties seems to be ok

sdk.dir=C:\Users\myuser\AppData\Local\Android\sdk
flutter.sdk=C:\src\flutter
flutter.versionName=1.0.0
flutter.versionCode=1
flutter.buildMode=debug

Also compileSdkVersion 34 as you in the image
enter image description here

I’m using Visual Studio Code on Windows.
Can somebody please help?

Tried to downgrade the compileSdkVersion to 30
Updated dependencies
cleaned cache
Move it to same path as Flutter path

I thought that with compile version 30 was enough but
The warnings I was getting indicated that the following plugins require Android SDK version 33 or higher:

flutter_secure_storage
google_mobile_ads
in_app_review

And the following plugins require Android SDK version 34 or higher:

package_info_plus
path_provider_android
share_plus
shared_preferences_android
sqflite
url_launcher_android
webview_flutter_android

So here I’m really confuse and complete stuck

oh! And here is the flutter doctor results

[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.19045.4412], locale es-ES)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.0 Preview 7.0)
[√] Android Studio (version 2023.3)
[√] VS Code (version 1.89.1)
[√] Connected device (3 available)
[√] Network resources

• No issues found!

2

Answers


  1. Chosen as BEST ANSWER

    Thank you @Survil

    I did first 3 steps

    PS C:srcflutterappsticstickerbakeai-main-appStickerBakeAI> flutter clean Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Deleting build... 9ms Deleting .dart_tool... 4ms Deleting Generated.xcconfig... 2ms Deleting flutter_export_environment.sh... 7ms Deleting .flutter-plugins-dependencies... 1ms Deleting .flutter-plugins... 1ms PS C:srcflutterappsticstickerbakeai-main-appStickerBakeAI> flutter pub get Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Resolving dependencies... Downloading packages... _fe_analyzer_shared 67.0.0 (68.0.0 available) analyzer 6.4.1 (6.5.0 available) ! flutter_secure_storage 9.0.0 (overridden) (9.2.1 available) ! http 1.2.1 (overridden) js 0.6.7 (0.7.1 available) leak_tracker 10.0.4 (10.0.5 available) leak_tracker_flutter_testing 3.0.3 (3.0.5 available) material_color_utilities 0.8.0 (0.11.1 available) meta 1.12.0 (1.15.0 available) test_api 0.7.0 (0.7.1 available) vm_service 14.2.1 (14.2.2 available) Got dependencies! 10 packages have newer versions incompatible with dependency constraints. Try flutter pub outdated for more information.

    I don't have "build" folder as It Is being impossible to run app never.

    And

    gradlew clean thing, it says it's not recognized.


  2. follow step below will help you

    • flutter pub cache repair

    • flutter clean
      -flutter pub get

    • restart invalide cache androd studio

    • delete build folder

    • ./gradlew clean in android folder

      ./gradlew clean assembleDebug

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search