Flutter項目編譯報錯-

當前Flutter版本

BtdeMacBook-M1-Air:nearhub-flutter btfeng$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel stable, 3.7.12, on macOS 14.4.1 23E224 darwin-arm64 (Rosetta), locale zh-Hans-CN)
[?] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[?] Xcode - develop for iOS and macOS (Xcode 15.3)
[?] Chrome - develop for the web
[?] Android Studio (version 2022.1)
[?] VS Code (version 1.88.0)
Scanning for devices is taking a long time...[?] Connected device (3 available)
    ! Error: Browsing on the local area network for iPad (2). Ensure the device is unlocked and attached with a cable or associated with the same local area network
      as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[?] HTTP Host Availability

編譯報錯
Execution failed for task ':qr_code_scanner:parseDebugLocalResources'.

Launching lib/main.dart on S55 in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':qr_code_scanner:parseDebugLocalResources'.
> Could not resolve all files for configuration ':qr_code_scanner:androidApis'.
   > Failed to transform android.jar to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for PlatformAttrTransform: /Users/btfeng/Library/Android/sdk/platforms/android-32/android.jar.
         > /Users/btfeng/Library/Android/sdk/platforms/android-32/android.jar

* 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 1m 9s
Exception: Gradle task assembleDebug failed with exit code 1
Exited

Exited

解決方案:

目前是移除了qr_code的庫。
后續(xù)自己解決了就更新。

?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容