我正在尝试在 react-native 中设置远程推送通知,我正在使用 react-native-fcm 包来完成它。我按照指南从包的 github 页面设置所需的东西。我一直跑到以下错误,我不确定缺少什么或者我做错了什么。
错误 :
:app:processDebugResources
C:\Users\test\Desktop\App_Dev\pushNotifyDev\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:58:31-47:
AAPT: No resource found that matches the given name (at 'resource' with value '@mipmap/ic_notif').
C:\Users\test\Desktop\App_Dev\pushNotifyDev\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:56: error: Error: No resource found that matches the given name (at 'resource' with value '@mipmap/ic_notif').
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 16.121 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
这是我的 AndroidManifest.xml 文件
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pushnotifydev"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_notif"/>
<service android:name="com.evollu.react.fcm.MessagingService" android:enabled="true" android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name="com.evollu.react.fcm.InstanceIdService" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
我正在使用以下 React-native -0.53 Android Studio -3.0.1
任何调试此问题的帮助将不胜感激。
谢谢