I want to add in-app purchase functionality in an app for which I am using flutter_inapp_purchase
package.
For some unknown reason it isn't working properly and to test it I need to run the app in release mode. But even on multiple try and changes, I am unable to run it in release mode(both on iOS and android)
For iOS, the build is successful but after making the build it sometimes gets stuck.
For android, the build is not getting made and I am getting the following error.
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.
This is my flutter doctor -v
output
[✓] 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.
Is there any other better way to do this? What is it that I am doing wrong?
Please help kinda stuck, any help would be great. Thanks for your time!