yangguansen opened a new issue #883: add <edit-config>,but cause 
AndroidManifest.xml change other tag code
URL: https://github.com/apache/cordova-android/issues/883
 
 
   # Bug Report
   Dear bro, I use with ionic v3. and I want to add android:allowBackup="false" 
in the AndroidManifest.xml. 
   ## Problem
   I add below code in the config.xml
   ```
   <edit-config file="AndroidManifest.xml" mode="merge" 
target="/manifest/application">
         <activity android:allowBackup="false"/>
   </edit-config>
   ```
   and then i run command 
   ```
   ionic cordova build android --prod --release
   ```
   it generate AndroidManifest.xml with less number of privider tag than natual 
AndroidManifest.xml
   ### What is expected to happen?
   application tag code as below:
   ```
   <application
           android:label="@ref/0x7f0b002a"
           android:icon="@ref/0x7f0a0000"
           android:hardwareAccelerated="true"
           android:allowBackup="false"
           android:supportsRtl="true">
   
           <activity
               android:theme="@ref/0x01030129"
               android:label="@ref/0x7f0b001f"
               android:name="bdh.tax.deloitte.MainActivity"
               android:launchMode="1"
               android:screenOrientation="1"
               android:configChanges="0xfb4"
               android:windowSoftInputMode="0x10">
   
               <intent-filter
                   android:label="@ref/0x7f0b002f">
   
                   <action
                       android:name="android.intent.action.MAIN" />
   
                   <category
                       android:name="android.intent.category.LAUNCHER" />
               </intent-filter>
           </activity>
   
           <activity
               android:theme="@ref/0x0103006d"
               android:name="com.sarriaroman.PhotoViewer.PhotoActivity" />
   
           <provider
               android:name="com.vaenow.appupdate.android.GenericFileProvider"
               android:exported="false"
               android:authorities="bdh.tax.deloitte.appupdate.provider"
               android:grantUriPermissions="true">
   
               <meta-data
                   android:name="android.support.FILE_PROVIDER_PATHS"
                   android:resource="@ref/0x7f0e0000" />
           </provider>
   
           <provider
               android:name="org.apache.cordova.camera.FileProvider"
               android:exported="false"
               android:authorities="bdh.tax.deloitte.provider"
               android:grantUriPermissions="true">
   
               <meta-data
                   android:name="android.support.FILE_PROVIDER_PATHS"
                   android:resource="@ref/0x7f0e0001" />
           </provider>
   
           <provider
               
android:name="io.github.pwlin.cordova.plugins.fileopener2.FileProvider"
               android:exported="false"
               android:authorities="bdh.tax.deloitte.opener.provider"
               android:grantUriPermissions="true">
   
               <meta-data
                   android:name="android.support.FILE_PROVIDER_PATHS"
                   android:resource="@ref/0x7f0e0003" />
           </provider>
   
           <meta-data
               android:name="android.support.VERSION"
               android:value="25.4.0" />
       </application>
   ```
   ### What does actually happen?
   
   in AndroidManifest.xml application tag is
   ```
   <application
           android:label="@ref/0x7f0b002a"
           android:icon="@ref/0x7f0a0000"
           android:allowBackup="false"
           android:hardwareAccelerated="true"
           android:supportsRtl="true">
   
           <activity
               android:theme="@ref/0x01030129"
               android:label="@ref/0x7f0b001f"
               android:name="bdh.tax.deloitte.MainActivity"
               android:launchMode="1"
               android:screenOrientation="1"
               android:configChanges="0xfb4"
               android:windowSoftInputMode="0x10">
   
               <intent-filter
                   android:label="@ref/0x7f0b002f">
   
                   <action
                       android:name="android.intent.action.MAIN" />
   
                   <category
                       android:name="android.intent.category.LAUNCHER" />
               </intent-filter>
           </activity>
   
           <provider
               android:name="org.apache.cordova.camera.FileProvider"
               android:exported="false"
               android:authorities="bdh.tax.deloitte.provider"
               android:grantUriPermissions="true">
   
               <meta-data
                   android:name="android.support.FILE_PROVIDER_PATHS"
                   android:resource="@ref/0x7f0e0001" />
           </provider>
   
           <meta-data
               android:name="android.support.VERSION"
               android:value="25.4.0" />
       </application>
   ```
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   ionic cordova build android --prod --release
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Ionic:
   
      Ionic CLI          : 5.2.4 (/usr/local/lib/node_modules/ionic)
      Ionic Framework    : ionic-angular 3.9.2
      @ionic/app-scripts : 3.2.0
   
   Cordova:
   
      Cordova CLI       : 9.0.0 ([email protected])
      Cordova Platforms : android 8.1.0, browser 6.0.0, ios 5.0.1
      Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, 
cordova-plugin-ionic-webview 4.1.1, (and 22 other plugins)
   
   Utility:
   
      cordova-res : 0.8.1 
      native-run  : 0.2.8 (update available: 0.3.0)
   
   System:
   
      Android SDK Tools : 26.1.1 (/Users/tax/Library/Android/sdk)
      ios-sim           : 8.0.2
      NodeJS            : v10.16.2 (/usr/local/bin/node)
      npm               : 6.9.0
      OS                : macOS Mojave
      Xcode             : Xcode 10.3 Build version 10G8
   
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to