flutter_appcenter_bundle
flutter_appcenter_bundle copied to clipboard
Newest flutter version unable to run
Encountered below error
e: /Users/xxx/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_appcenter_bundle-3.3.2/android/src/main/kotlin/com/github/hanabi1224/flutter_appcenter_bundle/FlutterAppcenterBundlePlugin.kt: (43, 47): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':flutter_appcenter_bundle:compileGooglePlayDebugKotlin'.
Compilation error. See log for more details
i'm having the same issue
i'm having the same issue too
Yup, same for me.
And I get the same error after I downgrade to an older version as well:
C:\Users<username>\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_appcenter_bundle-3.3.1+2\android\src\main\kotlin\com\github\hanabi1224\flutter_appcenter_bundle\FlutterAppcenterBundlePlugin.kt: (43, 47): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?
This all started happening after I upgraded to Flutter 3. I noticed that this library isn't compatible yet, so I reverted to Flutter 2.10.3, but then the problem remains. I tried clearing all kinds of caches, but no luck so far. So basically I am stuck at the moment, or should disable this plugin altogether.
The solution is to fix line 43 in the FlutterAppCenterBundlePlugin.kt file
application = registrar.activity()?.application instead of application = registrar.activity().application
is just to add the ?
for the moment it will be necessary to make a fork
Good afternoon , is there any other solution for this other than creating a fork ?
hello good afternoon, any solution to the problem?
Thanks
The solution is to fix line 43 in the FlutterAppCenterBundlePlugin.kt file application = registrar.activity()?.application instead of application = registrar.activity().application
is just to add the ?
for the moment it will be necessary to make a fork
@ivanndrey620 I've installed it via pub and I can't find the FlutterAppCenterBundlePlugin.kt file in my project i only have the .dart
do you know where it's located so i can fix this bug ?
Thanks