我对此很菜鸟,所以如果您回答的话,请提前致谢。 我正在尝试运行一个项目,只是为了模仿它,但这是不可能的
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.\r\nCould not create task ':generateLockfiles'.\r\nProcess '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
}]
不确定这是否与 flutter 运行问题有关。但即使忽略这一点,我运行它,我得到了这个
Launching lib\main.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.
不明白问题出在哪里 我当地的房产好像还可以
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
也像图片中那样编译SdkVersion 34 在此输入图片描述
我在 Windows 上使用 Visual Studio Code。 有人可以帮忙吗?
尝试将compileSdkVersion降级到30 更新了依赖项 清理缓存 将其移动到与 Flutter 路径相同的路径
我认为编译版本 30 就足够了,但是 我收到的警告表明以下插件需要 Android SDK 版本 33 或更高版本:
flutter_secure_storage 谷歌移动广告 in_app_review
以下插件需要 Android SDK 版本 34 或更高版本:
package_info_plus 路径_provider_android 分享加 共享首选项_android sqflite url_launcher_android webview_flutter_android
所以我真的很困惑并且完全陷入困境
哦!这是 flutter doctor 结果
[√] 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!
按照以下步骤对您有帮助
flutter pub 缓存修复
颤抖干净 -flutter 酒吧获取
重启无效缓存androd studio
删除构建文件夹
./gradlew clean 在 android 文件夹中
./gradlew clean assembleDebug