Closed arabnology closed 4 months ago
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Any updates on this ?
Any updates?
Any updates?
Do you have the same problem ?
Any updates?
Do you have the same problem ?
Yes I do. I was able to fix the issue with downgrading the dependencies to
purchases_flutter: 6.24.0
purchases_ui_flutter: 6.24.0
I also noticed that if you change the minSdk version to 24, then the issue does not appear for the latest release. However, my project requires minSdk version 26 for android and due to that the latest release cause the original posted issue. Hence, my workaround was to downgrade the package versions. Hope this helps. :)
Hi @arabnology, could you confirm which minSdkVersion you are setting? I'll use that to try to reproduce this issue.
Hi @arabnology, could you confirm which minSdkVersion you are setting? I'll use that to try to reproduce this issue.
Hi, this is my Android app gradle:
android {
compileSdk = 35
ndkVersion = "27.0.11902837"
namespace = "..."
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId = "..."
minSdk = 24
targetSdk = 35
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
}
signingConfigs {
release {
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword = keystoreProperties['storePassword']
}
}
buildFeatures {
buildConfig true
}
buildTypes {
release {
signingConfig = signingConfigs.release
}
}
}
Hi @arabnology, could you confirm which minSdkVersion you are setting? I'll use that to try to reproduce this issue.
Can you guys please fix this issue ASAP, as we are waiting for the fixes to release the app?
Hellooo ?! you guys will fix this or not ?
Any updates ?
Any updates?
Do you have the same problem ?
Yes I do. I was able to fix the issue with downgrading the dependencies to
purchases_flutter: 6.24.0 purchases_ui_flutter: 6.24.0
I also noticed that if you change the minSdk version to 24, then the issue does not appear for the latest release. However, my project requires minSdk version 26 for android and due to that the latest release cause the original posted issue. Hence, my workaround was to downgrade the package versions. Hope this helps. :)
Downgrading the version to 6.24.0 is a bad idea because this version has a lot of issues on Android, especially if the store is not available and the user must sign in to the store. I have tested it out.
Thank you :(
Still not working in version purchases_ui_flutter 6.30.0
Bump
Bump
Go to flutter plugins, open purchases_ui_flutter Open android folder Then go the class PurchasesUiFlutterPlugin.ktx in src.main
Add "@com.revenuecat.purchases.ui.revenuecatui.ExperimentalPreviewRevenueCatUIPurchasesAPI" (Remove "" when adding) in top of the class name, it will work.
But i dont know if it has any bad side or effect
Go to flutter plugins, open purchases_ui_flutter
Hi, how will I go to flutter plugins?
Go to flutter plugins, open purchases_ui_flutter
Hi, how will I go to flutter plugins?
On Android Studio, it's on the left side at the bottom, check the screenshot.
I would recommend that you create your own paywall, as I have done, for two reasons:
First, there are a lot of issues, error messages are not customizable and are very limited.
Second, they will take a lot of time to fix the issues.
I have created my own paywall, and it looks similar to theirs but is more customizable, i handled all errors and it is crazy fast.
Do you know how to implement purchasing trials in android? That is the reason why I started using purchases UI. I already know how to purchase trials in ios.
Do you know how to implement purchasing trials in android? That is the reason why I started using purchases UI. I already know how to purchase trials in ios.
Yes, simply ask ChatGPT this question and it will tell you how to do that exactly: "Do you know how to implement purchasing trials in android?"
We are very sorry we missed replying to this issue. I just merged #1112 which will fix it in the next release.
‼️ Required data ‼️
Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.
There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!
Environment
flutter doctor
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-x64, locale en-SA) [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2024.1) [✓] VS Code (version 1.90.2) [✓] Connected device (4 available)! Error: Browsing on the local area network for iPad. 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) [✓] Network resources
• No issues found!
purchases-flutter
purchases_flutter: ^6.29.4 purchases_ui_flutter: ^6.29.4FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':purchases_ui_flutter:compileDebugKotlin'.
Try:
BUILD FAILED in 49s Error: Gradle task assembleDebug failed with exit code 1
static Future initPurchases({
final VoidCallback? onStart,
final VoidCallback? onSuccess,
final void Function(String error)? onError,
final VoidCallback? onComplete,
}) async {
try {
onStart?.call();
if (_purchasesConfiguration != null) {
onSuccess?.call();
return true;
}
if (Platform.isAndroid) {
_purchasesConfiguration = PurchasesConfiguration(_googleApiKey);
} else if (Platform.isIOS) {
_purchasesConfiguration = PurchasesConfiguration(_appleApiKey);
} else {
_purchasesConfiguration = null;
}
if (_purchasesConfiguration != null) {
await Purchases.configure(_purchasesConfiguration!).timeout(const Duration(seconds: 16));
onSuccess?.call();
return true;
} else {
onError?.call(LanguageManager.translation.error_try_again);
}
} on TimeoutException {
onError?.call(LanguageManager.translation.connectiontimeout);
} catch () {
onError?.call(LanguageManager.translation.error_try_again);
} finally {
onComplete?.call();
}
return false;
}
static Future startPurchasing({
final VoidCallback? onStart,
final VoidCallback? onSuccess,
final void Function(String error)? onError,
final VoidCallback? onComplete,
}) async {
try {
onStart?.call();
final PaywallResult paywallResult = await RevenueCatUI.presentPaywallIfNeeded(
"iconvo_premium_enti1",
displayCloseButton: true,
);
if (paywallResult == PaywallResult.purchased || paywallResult == PaywallResult.restored) {
onSuccess?.call();
return true;
} else {
onError?.call(LanguageManager.translation.error_try_again);
}
} on TimeoutException {
onError?.call(LanguageManager.translation.connectiontimeout);
} catch () {
onError?.call(LanguageManager.translation.error_try_again);
} finally {
onComplete?.call();
}
return false;
}
void _startPurchasing() { if (ConnectivityManager.connectedToInternet.value) { PurchaseManager.initPurchases( onStart: () { setState(() { _actionActive = true; }); }, onSuccess: () { PurchaseManager.startPurchasing( onSuccess: () { print("onSuccess"); }, onError: (error) { DialogsManager.showAlertDialog( title: LanguageManager.translation.error, content: error, actions: (context) => [ TextButton( onPressed: () { Navigator.of(context).pop(); }, child: Text( LanguageManager.translation.ok, style: ThemeManager.theme.textTheme.labelLarge, ), ), ], ); }, onComplete: () { setState(() { _actionActive = false; }); }, ); }, onError: (error) { setState(() { _actionActive = false; }); DialogsManager.showAlertDialog( title: LanguageManager.translation.error, content: error, actions: (context) => [ TextButton( onPressed: () { Navigator.of(context).pop(); }, child: Text( LanguageManager.translation.ok, style: ThemeManager.theme.textTheme.labelLarge, ), ), ], ); }, ); } else { DialogsManager.showAlertDialog( title: LanguageManager.translation.error, content: LanguageManager.translation.no_internet_connection, actions: (context) => [ TextButton( onPressed: () { Navigator.of(context).pop(); }, child: Text( LanguageManager.translation.ok, style: ThemeManager.theme.textTheme.labelLarge, ), ), ], ); } }