我的Ionic5 +电容器构建在Android上失败,错误如下。如果我谷歌我发现类似的错误是有关fb_app
设置。我认为Android项目配置错误。是下面配置中的这一行吗:
android:label="@string/activity_name"
我应该找什么来调试它?
android/capacitor-cordova-android-plugins/build/intermediates/library_manifest/debug/AndroidManifest.xml:50:9-56:58: AAPT: error: resource string/activity_name (aka APP_NAME:string/activity_name) not found.
下面是命名文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:amazon="http://schemas.amazon.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
package="capacitor.android.plugins"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="29" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application>
<meta-data
android:name="firebase_analytics_collection_enabled"
android:value="$ANALYTICS_COLLECTION_ENABLED" />
<meta-data
android:name="google_analytics_automatic_screen_reporting_enabled"
android:value="$AUTOMATIC_SCREEN_REPORTING_ENABLED" />
<receiver
android:name="nl.xservices.plugins.ShareChooserPendingIntent"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
</intent-filter>
</receiver>
<provider
android:name="nl.xservices.plugins.FileProvider"
android:authorities="${applicationId}.sharing.provider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/sharing_paths" />
</provider>
<activity
android:name="com.keyes.youtube.OpenYouTubePlayerActivity"
android:screenOrientation="landscape" />
<activity
android:name="com.bunkerpalace.cordova.YouTubeActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
android:label="@string/activity_name"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustResize" />
</application>
</manifest>
所有的工作都很好的iOS BTW。
2条答案
按热度按时间vlurs2pr1#
在android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml中将@string/activity_name替换为您的任意名称
假设你使用电容器。
1wnzp6jl2#
在res/values/strings.xml中添加以下内容:您的姓名