“SplashScreen”插件未在 Android 上实现 CapacitorException.Wrapper

Nsa*_*aac 1 android ionic-framework capacitor

当我将 Ionic 5 项目升级到 Capacitor 3.1.1 时,出现此错误。更新后我开始得到这个。

错误错误:未捕获(承诺):错误:“SplashScreen”插件未在 Android 上实现 错误:“SplashScreen”插件未在 Android 上实现

我在这里需要帮助..

Iva*_*van 5

根据 Capacitor js 指南 https://capacitorjs.com/docs/updating/3-0#switch-to-automatic-android-plugin-loading

必须在 MainActivity.java 中删除此方法。

this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
-            // Additional plugins you've installed go here
-            add(Plugin1.class);
-            add(Plugin2.class);
-        }});
Run Code Online (Sandbox Code Playgroud)