当我尝试使用Google Map使用本机响应构建应用程序时收到此错误。编辑Android清单以包含API密钥后出现错误。 这是错误
C:\Users\x0zon\Documents\CPTR405\carbooking>react-native run-android
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
> Task :app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
C:\Users\x0zon\Documents\CPTR405\carbooking\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:34: AAPT: error: attribute android:configchanges not found.
C:\Users\x0zon\Documents\CPTR405\carbooking\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:34: AAPT: error: attribute android:windowsoftinputmode not found.
error: failed processing manifest.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
23 actionable tasks: 1 executed, 22 up-to-date
error 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
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
这是Android清单
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.carbooking">
<uses-permission android:name="android.permission.INTERNET" />
<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">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="API key intentionally removed />
<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>
我是新来的反应者,并且是android studio,我尝试了一些与build.gradle中的gradle版本进行更改有关的解决方案,并且我的同学使用相同的android清单文件没有问题。我迷路了,很困惑。