gpt4 book ai didi

android - Ionic5 电容器修复 AndroidManifest.xml 缺少 Activity 名称

转载 作者:行者123 更新时间:2023-12-05 06:03:26 29 4
gpt4 key购买 nike

我对 android 构建没有那么多经验,因此我的问题是如何将请求的属性添加到构建中。

/home/me/app/android/capacitor-cordova-android-plugins/build/intermediates/library_manifest/debug/AndroidManifest.xml:71:9-77:58: AAPT: error: resource string/activity_name (aka com.myapp.app:string/activity_name) not found.
find . -name AndroidManifest*
./app/src/main/AndroidManifest.xml
./app/build/intermediates/instant_app_manifest/debug/AndroidManifest.xml
./app/build/intermediates/merged_manifests/debug/AndroidManifest.xml
./app/build/intermediates/bundle_manifest/debug/bundle-manifest/AndroidManifest.xml
./capacitor-cordova-android-plugins/src/main/AndroidManifest.xml
./capacitor-cordova-android-plugins/build/intermediates/library_manifest/debug/AndroidManifest.xml

所以我似乎必须使用上面所需的 key 扩展 ./capacitor-cordova-android-plugins/src/main/AndroidManifest.xml,但我不确定如何?这就是 capacitor - AndroidManifest.xml 的样子,我只是不知道要在那里添加什么。丢失的 com.myapp.app:string/activity_name 的正确 xml 键是什么?

<?xml version='1.0' encoding='utf-8'?>
<manifest package="capacitor.android.plugins"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:amazon="http://schemas.amazon.com/apk/res/android">
<application >
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent"/>
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value=""/>
<meta-data android:name="firebase_analytics_collection_enabled" android:value="true"/>
<meta-data android:name="google_analytics_automatic_screen_reporting_enabled" android:value="true"/>
<service android:name="by.chemerisuk.cordova.firebase.FirebaseMessagingPluginService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="default"/>
<receiver android:name="nl.xservices.plugins.ShareChooserPendingIntent" android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.SEND"/>
</intent-filter>
</receiver>
<provider android:authorities="${applicationId}.sharing.provider" android:exported="false" android:grantUriPermissions="true" android:name="nl.xservices.plugins.FileProvider">
<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>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<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" android:required="true"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

最佳答案

好的,我找到了。我必须更改 YouTubeActivity -> android:label="@string/activity_name"android:label="@string/app_name"以便构建完成。

关于android - Ionic5 电容器修复 AndroidManifest.xml 缺少 Activity 名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66643014/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com