我在ionic 4应用程序中安装了firebase插件,但是在构建应用程序时却遇到此异常:
BUILD FAILED in 9s
cmd: Command failed with exit code 1 Error output:
D:\ionicapp\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePluginMessagingService.java:128: error: constructor Builder in class Builder cannot b
e applied to given types;
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this, channelId);
^
required: Context
found: FirebasePluginMessagingService,String
reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
插件版本为2.0.5,Android minSDK设置为19,Android targetSDK为27
我尝试过ionic cordova platform remove android
,然后重新安装,但仍然出现错误。