且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

发行版Android中的Flutter中缺少MissingPluginException

更新时间:2023-11-17 21:46:28

最近扑朔迷离的proguard规则正在弹出未正确注册的插件

Looks like the recent proguard rules in flutter is ejecting the plugins which arent registering properly

在项目的 app/build.gradle

更改

buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }

buildTypes {
        release {
            shrinkResources false
            minifyEnabled false
            signingConfig signingConfigs.release
        }
    }

添加的额外两行似乎跳过了proguard规则部分,从而免除了您的噩梦,这只是暂时的解决方法,可能很快就会解决

The added extra 2 lines seems to skip the proguard rules part thereby saving your from the nightmare , this is just a temporary work around , there might be a fix soon from flutter

当然,这会跳过proguard优化,但现在至少可以使用该代码;)

Ofcourse this skips the proguard optimization , but atleast the code works now ;)

我一直在浪费时间将近6个小时,却不知道解决方案,所以我将其发布在这里给其他人

I have been wasting my time for almost 6 hours without knowing the solution ,so I am posting it here for others