私はIonicアプリで作業しています。AndroidManifest.xmlファイルでandroid @ autoBackup = "false"をconfig.xmlで追加します。 cordovaのドキュメントによると、cordovaバージョン6.4は、config.xmlのedit-configタグをサポートしています。これを使用すると、plugin.xmlと同様のことができます。edit-configがcordovaのconfig.xmlで動作しません
これは私がconfig.xmlファイルで書いたものです。
<platform name="android">
<edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge">
<application android:autoBackup="false" />
</edit-config>
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
</platform>
そしてそれは、あなたが簡単にアプリケーションタグはアンドロイドで更新されている見つけることができるのAndroidManifest.xmlの上記のコードでこの
<application android:autoBackup="false" android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<application android:autoBackup="false" />
<activity android:exported="true" android:launchMode="singleTop" android:name="com.gae.scaffolder.plugin.FCMPluginActivity">
<intent-filter>
<action android:name="FCM_PLUGIN_ACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service android:name="com.gae.scaffolder.plugin.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="com.gae.scaffolder.plugin.MyFirebaseInstanceIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
</application>
のように私のAndroidManifest.xmlファイルを変更する@自動バックアップ=「false」とが、また、autoBackup属性を持つ最初のタグの子としてアプリケーションタグを追加しました。 私は子タグとしてアプリケーションタグを必要としません、私は多くを試みたが、この問題の根本的な原因を見つけることができませんでした。 誰も私がここで間違っていることを教えてもらえますか? ありがとうございます。
、それでも私は同じ問題を取得しています:このプラグインを使用すると、単にthisのようにconfig.xmlののアンドロイドセクションに優先タグを追加することができます。お勧めのプラグイン私は前に使用して、期待されている作業をしていますが、このプラグインをもう使用したくない場合でも、 "cordova-plugin-custom-config"プラグインのdocs [here](https:// github。 com/dpa99c/cordova-custom-config#アンドロイド - プリファレンス)。 –
ターゲットプロパティを '/ *'または '/ manifest/*'に変更してみることができますか?多分それは絶対的な道でなければならない。 custom-configプラグインを使用して何が問題なのか尋ねてもいいですか? – David
は、ターゲットプロパティを変更した後も同じ問題が発生します。 custom-configプラグインには特別な理由はありません。アプリケーションタグに属性を1つだけ追加するだけでいいので、今は[email protected]を使用しています。そのため、プラグインなしで達成しようとしています。何も肯定的になれば、custom-configプラグインを続けることができます。あなたの継続的な助けを本当に感謝します。 –