adaptyteam / AdaptySDK-Flutter

SDK for growing mobile in-app purchases
https://docs.adapty.io/docs/quickstart
MIT License
95 stars 17 forks source link

Error building app on Android - HELP #33

Closed developer-farhan closed 2 years ago

developer-farhan commented 2 years ago

it works and builds fine on IOS

but on android I get

Type inference failed: Not enough information to infer parameter R in inline fun <T, R> T.let(block: (T) -> R): R Please specify it explicitly.

/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/adapty_flutter-0.3.6/android/src/main/kotlin/com/adapty/flutter/AdaptyFlutterPlugin.kt: (162, 101): Unresolved reference: logShowPaywall

im using adapty_flutter: ^0.3.4

otopba commented 2 years ago

@officialFlutterDeveloper Try the latest version of the library 1.0.7. It will work

developer-farhan commented 2 years ago

@officialFlutterDeveloper Try the latest version of the library 1.0.7. It will work

I thought upgrading the version would help but no luck here's what I get

e: /Users/Craig/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/adapty_flutter-1.0.7/android/src/main/kotlin/com/adapty/flutter/AdaptyFlutterPlugin.kt: (134, 52): Expecting an argument e: /Users/Craig/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/adapty_flutter-1.0.7/android/src/main/kotlin/com/adapty/flutter/AdaptyFlutterPlugin.kt: (245, 42): Expecting an argument e: /Users/Craig/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/adapty_flutter-1.0.7/android/src/main/kotlin/com/adapty/flutter/AdaptyFlutterPlugin.kt: (213, 63): Unresolved reference: from e: /Users/Craig/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/adapty_flutter-1.0.7/android/src/main/kotlin/com/adapty/flutter/AdaptyFlutterPlugin.kt: (495, 60): Unresolved reference: from

FAILURE: Build failed with an exception.

developer-farhan commented 2 years ago

also did these steps

https://docs.adapty.io/docs/android-installation

But no luck

vladd-g commented 2 years ago

@officialFlutterDeveloper hi, I suppose you have Kotlin 1.3.x version in your build.gradle file, please change it to 1.4.32 and the problem will be gone

developer-farhan commented 2 years ago

that was indeed the solution thank you