Closed samatzp closed 2 years ago
same thing!
Change file .pub-cache/hosted/pub.dartlang.org/adapty_flutter-1.0.9/android/src/main/kotlin/com/adapty/flutter/registrant/AdaptyPluginRegistrant.kt to
`package com.adapty.flutter.registrant
import com.adapty.flutter.AdaptyFlutterPlugin import io.flutter.plugin.common.PluginRegistry
object AdaptyPluginRegistrant {
fun registerWith(registry: PluginRegistry?) {
if (alreadyRegisteredWith(registry)) {
return
}
registry?.registrarFor("com.adapty.flutter.AdaptyFlutterPlugin")?.let { registrar ->
AdaptyFlutterPlugin.registerWith(registrar)
}
}
private fun alreadyRegisteredWith(registry: PluginRegistry?): Boolean {
val key: String? = AdaptyPluginRegistrant::class.java.canonicalName
if (key == null) return false;
if (registry?.hasPlugin(key) ?: false) {
return true
}
registry?.registrarFor(key)
return false
}
}`
@DipDevStudio THANK you, you saved me a lot of headache
Hey everyone! We have added support for the Flutter 3.0 in the release 1.0.11.
e: /Users/GG/.pub-cache/hosted/pub.dartlang.org/adapty_flutter-1.0.9/android/src/main/kotlin/com/adapty/flutter/registrant/AdaptyPluginRegistrant.kt: (19, 33): Type mismatch: inferred type is String? but String was expected e: /Users/GG/.pub-cache/hosted/pub.dartlang.org/adapty_flutter-1.0.9/android/src/main/kotlin/com/adapty/flutter/registrant/AdaptyPluginRegistrant.kt: (22, 31): Type mismatch: inferred type is String? but String was expected
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':adapty_flutter:compileDebugKotlin'.
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 32s Exception: Gradle task assembleDebug failed with exit code 1