LaoMengFlutter / flutter-do

包含350多个组件用法、组件继承关系图、40多个 loading 组件,App升级、验证码、弹幕、音乐字幕 4个插件,一个小而全完整的App项目。
http://laomengit.com/
Apache License 2.0
2.62k stars 538 forks source link

flutter_app_upgrade @NonNull 不兼容 #47

Open lesterchn2020 opened 3 years ago

lesterchn2020 commented 3 years ago

日志 e: ~/.pub-cache/hosted/pub.flutter-io.cn/flutter_app_upgrade-1.0.2/android/src/main/kotlin/com/flutter/flutter_app_upgrade/FlutterAppUpgradePlugin.kt: (62, 54): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type File? e: ~/.pub-cache/hosted/pub.flutter-io.cn/flutter_app_upgrade-1.0.2/android/src/main/kotlin/com/flutter/flutter_app_upgrade/FlutterAppUpgradePlugin.kt: (127, 20): None of the following functions can be called with the arguments supplied: @NonNull public open fun setClassName(@NonNull p0: Context, @NonNull p1: String): Intent defined in android.content.Intent @NonNull public open fun setClassName(@NonNull p0: String, @NonNull p1: String): Intent defined in android.content.Intent

lesterchn2020 commented 3 years ago

image

sleepreading commented 3 years ago

Same Problem: Only safe (?.) or non-null asserted (!!.) calls are allowed on a

environment: Flutter 1.25.0-8.1.pre • channel beta Dart 2.12.0

cn-Meepo commented 3 years ago

请问这个问题解决了吗?

piglet-coder commented 3 years ago

+1

mekery commented 3 years ago

+1

LaoMengFlutter commented 3 years ago

正在更新 2.0 兼容版本。

nbhhcty commented 3 years ago

请问解决了吗?

cipchk commented 3 years ago

@LaoMengFlutter 请问有发布具体时间点吗?

cipchk commented 3 years ago

各位有没有其他类似插件可以替代的?

rhymelph commented 3 years ago

r_upgrade试试

mikewolfli commented 3 years ago

解决方法在这:https://github.com/LaoMengFlutter/flutter-do/issues/25

mikewolfli commented 3 years ago

打开FlutterAppUpgradePlugin.kt这个文件。

一、 第62行 result.success(mContext.getExternalFilesDir("")!!.absolutePath) //加入!! 第127行 goToMarket.setClassName(marketPackageName.toString(), marketClassName.toString()) //添加.toString()