我安装了react-native-push-notification,但出现此错误。我手动链接了
> Task :app:compileDebugJavaWithJavac FAILED
C:\Users\Zarzu Victor\PayReminder1\android\app\src\main\java\com\payreminder1\MainApplication.java:16: error: package com.dieam.reactnativepushnotification does not exist
import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage;
^
C:\Users\Zarzu Victor\PayReminder1\android\app\src\main\java\com\payreminder1\MainApplication.java:39: error: cannot find symbol
new ReactNativePushNotificationPackage()
^
symbol: class ReactNativePushNotificationPackage
2 errors
FAILURE: Build failed with an exception.
答案 0 :(得分:0)
我找到了答案 实际上在package.json依赖项中 即使安装后,这两个依赖项仍然丢失
"react-native-permissions": "^2.1.5",
"react-native-push-notification": "^3.5.2"