Flutter应用无法在发布模式下运行

时间:2020-08-19 19:10:07

标签: android ios flutter flutter-in-app-purchase

我想在我正在使用flutter_inapp_purchase软件包的应用程序中添加应用程序内购买功能。

由于某种未知原因,它无法正常工作,要对其进行测试,我需要在发布模式下运行该应用程序。但是即使进行多次尝试和更改,我也无法在发布模式下运行它(在iOS和Android上)

对于iOS,该构建成功,但是在构建之后有时会卡住。

对于android系统,构建没有完成,并且出现以下错误。

Note: /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/device_apps-1.1.1+1/android/src/main/java/fr/g123k/deviceapps/DeviceAppsPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.13.7/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inapp_purchase-2.2.0/android/src/main/java/com/dooboolab/flutterinapppurchase/AndroidInappPurchasePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/bhawna/dev/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/android/src/main/java/io/flutter/plugins/urllauncher/WebViewActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_appavailability:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     /Users/bhawna/.gradle/caches/transforms-2/files-2.1/e74a1afd426538a36f0d6b21d498af68/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.

     /Users/bhawna/.gradle/caches/transforms-2/files-2.1/e74a1afd426538a36f0d6b21d498af68/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.


这是我的flutter doctor -v输出

[✓] Flutter (Channel dev, 1.21.0-9.0.pre, on Mac OS X 10.15.6 19G73, locale
    en-US)
    • Flutter version 1.21.0-9.0.pre at /Users/bhawna/dev/flutter
    • Framework revision 7c6f9dd239 (10 days ago), 2020-08-09 10:31:03 -0400
    • Engine revision 6d86e67f04
    • Dart version 2.10.0 (build 2.10.0-4.0.dev 0341576448)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/bhawna/Library/Android/sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.6, Build version 11E708
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.48.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.13.2

[✓] Connected device (3 available)
    • Bhawna’s iPhone (mobile)   • 8db4684a59e3d07e4716a1f9e84d4749ab6ac10c •
      ios • iOS 13.6
    • iPhone 8 (mobile)          • 3D03BDE4-F1A6-45AB-B095-01107CDDC2CD     •
      ios • com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)
    • iPhone 11 Pro Max (mobile) • 0F66E6C9-7DEB-49C7-AEA9-ABF7A08BDDDF     •
      ios • com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)

! Doctor found issues in 1 category.

还有其他更好的方法吗?我做错了什么事?

请帮忙,请帮忙。感谢您的宝贵时间!

0 个答案:

没有答案