当npx react-native启动时 -- --reset-cache
warn 包react-native-sqlite-storage包含无效配置:不允许“ dependency.platforms.ios.project ”。请使用“ react-native config ”命令验证其是否正确链接,并就此联系软件包维护人员。
我的配置:
"react-native-sqlite-storage": "^3.3.3", // 目前最新的
反应本机.config.js:
module.exports = {
dependency: {
platforms: {
ios: {
project: './platforms/ios/SQLite.xcodeproj'
},
android: {
sourceDir: './platforms/android'
},
windows: {
sourceDir: './platforms/windows',
solutionFile: 'SQLitePlugin.sln',
projects: [
{
projectFile: 'SQLitePlugin/SQLitePlugin.vcxproj',
directDependency: true,
}
],
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
错误:
react-native-sqlite-storage 包含无效配置:不允许“dependency.platforms.ios.project”
任务“:app:processReleaseMainManifest”执行失败。
清单合并失败:需要为元素 <receiver#com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver> 显式指定android:exported 。
android:exported当相应组件定义了意图过滤器时,面向 Android 12 及更高版本的应用需要指定显式值。
AndroidManifesr.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.projectrn">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Change the value to true to enable pop-up for in foreground on receiving remote notifications (for prevent duplicating while showing local notifications set this to false) -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground"
android:value="false"/>
<!-- Change the …Run Code Online (Sandbox Code Playgroud)