premji012 opened a new issue #154:
URL: https://github.com/apache/cordova-common/issues/154


   # Bug Report
   
   ## Problem
   A specific configuration done using edit-config element in plugin.xml, 
applies properly when plugin is added through cordova plugin add. But the same 
edit-config results in a bug if cordova prepare command is used whenever after 
adding the plugin.
   The config that i used is as follows,
   <edit-config file="AndroidManifest.xml" 
target="/manifest/application/activity[@android:name='MainActivity']" 
mode="merge">
         <activity android:name="org.apache.cordova.log.MultiViewActivity" />
   </edit-config>
   I tried to use my custom activity in place of MainActivity
   
   ### What is expected to happen?
   <activity 
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
 android:label="@string/activity_name"  android:name="MultiViewActivity">
               <intent-filter android:label="@string/launcher_name">
                   <action android:name="android.intent.action.MAIN" />
                   <category android:name="android.intent.category.LAUNCHER" />
               </intent-filter>
           </activity>
   
   
   ### What does actually happen?
   <activity 
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
 android:label="@string/activity_name"  android:name="MultiViewActivity">
               <intent-filter android:label="@string/launcher_name">
                   <action android:name="android.intent.action.MAIN" />
                   <category android:name="android.intent.category.LAUNCHER" />
               </intent-filter>
           </activity>
   
   <activity android:name="org.apache.cordova.plugin_name.MultiViewActivity" />
   
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   First time when i add plugin, it works fine. The MainActivity name is 
replaced with MultiViewActivity.
   But after i run cordova prepare, the extra activity tag for same className 
get appened which causes two activity element with same name error and build 
fails. Even console error is thrown for cordova prepare command
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   I am using cordova 10.0.0 and cordova-android version 9.0.0
   
   
   ### 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.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ ] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [ ] 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]



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

Reply via email to