You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/11/17 22:05:24 UTC

[GitHub] [cordova-android] blukis opened a new issue #868: Cannot modify "android:configChanges" in main activity with

blukis opened a new issue #868: Cannot modify "android:configChanges" in main activity with <edit-config>
URL: https://github.com/apache/cordova-android/issues/868
 
 
   # Bug Report
   Using ```<edit-config>```, cannot modify attribute "android:configChanges" in main activity (or any attribute of main activity) in AndroidManifest.xml.
   
   ## Problem
   Using ```<edit-config>``` node in config.xml, trying to modify/add an attribute in main <activity> in AndroidManifest.xml.  Doing so fails to build in PhoneGap Build, cli-9.0.0.  E.g. putting either of the following in config.xml causes the build to fail with error...
   > "Unable to graft xml at selector "/manifest/application/activity[1]" from "/var/gimlet/tmp/47238139485000/1918912/app/src/main/AndroidManifest.xml" during config install"
   
   ```
   <edit-config platform="android" file="AndroidManifest.xml" target="/manifest/application/activity[1]" mode="merge">
   	<activity android:configChanges="screenSize|smallestScreenSize|orientation|screenLayout" />
   </edit-config>
   ```
   
   ```
   <edit-config platform="android" file="AndroidManifest.xml" target="/manifest/application/activity[1]" mode="merge">
   	<activity mytest="12345" />
   </edit-config>
   ```
   
   Modifying a different node (e.g. ```<application>``` node) works fine:
   ```
   <edit-config platform="android" file="AndroidManifest.xml" target="/manifest/application" mode="merge">
   	<application mytest="12345" />
   </edit-config>
   ```
   
   ### What is expected to happen?
   Expecting build to succeed, with new or modified attribute in AndroidManifest.xml, of first ```<activity>``` node.
   
   ### What does actually happen?
   Build fails with error above.
   
   ## Information
   Nothing more.
   
   ### Command or Code
   Build the app (I'm using PhoneGap build, because cordova-proper is beyond my expertise).  Fails to build.
   
   ### Environment, Platform, Device
   Android
   
   ### Version information
   Phonegap build, using cli-9.0.0
   
   ## Checklist
   - [x] I searched for existing GitHub issues
   - [?] 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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org