MobileChromeApps / mobile-chrome-apps

Chrome apps on Android and iOS
BSD 3-Clause "New" or "Revised" License
2.5k stars 347 forks source link

cca0.7.0 error: android.enforceUniquePackageName #567

Closed imskull closed 9 years ago

imskull commented 9 years ago

I just upgraded my project from 0.6.0 to 0.7.0, I got an error when build for android apk:

Error: more than one library with package name 'com.google.android.gms'
You can temporarily disable this error with android.enforceUniquePackageName=false
However, this is temporary and will be enforced in 1.0

according to https://cordova.apache.org/docs/en/edge/guide_platforms_android_tools.md.html , I tried to add enforceUniquePackageName to my own plugin, but still got the error. my gradle:

# This file is included at the beginning of `build.gradle`
ext.android.enforceUniquePackageName=false  
# When set, this function allows code to run at the end of `build.gradle`
ext.postBuildExtras = {
    android.enforceUniquePackageName=false  
}

my plugin.xml:

<platform name="android">
  <framework src="src/android/fix_dupl_gms.gradle" custom="true" type="gradleReference" />
....

Anybody know how to remove the duplicate package error or how to make enforceUniquePackageName work?

imskull commented 9 years ago

my used plugins:

> cca plugin list                                                                         
cca v0.7.0                                                                                
android.support.v4 21.0.1 "Android Support v4"                                            
cc.fovea.plugins.inapppurchase 3.4.1 "InAppPurchase"                                      
com.google.playservices 21.0.0 "Google Play Services for Android"                         
com.ionic.keyboard 1.0.4 "Keyboard"                                                       
MY OWN PLUGIN HERE                                                                        
cordova-plugin-background-app 2.0.0 "Background App"                                      
cordova-plugin-blob-constructor-polyfill 1.0.2 "Blob constructor shim"                    
cordova-plugin-chrome-apps-audiocapture 1.0.5 "Chrome AudioCapture API"                   
cordova-plugin-chrome-apps-bootstrap 2.0.5 "Chrome Apps Core"                             
cordova-plugin-chrome-apps-common 1.0.7 "Chrome Apps Common Utils"                        
cordova-plugin-chrome-apps-filesystem 1.0.5 "Chrome Apps FileSystem API"                  
cordova-plugin-chrome-apps-i18n 2.0.1 "Chrome Apps I18n API"                              
cordova-plugin-chrome-apps-identity 1.4.2 "Chrome Apps Identity API"                      
cordova-plugin-chrome-apps-navigation 1.0.3 "Chrome Apps Navigation"                      
cordova-plugin-chrome-apps-notifications 1.2.0 "Chrome Apps Notifications API"            
cordova-plugin-chrome-apps-power 1.0.4 "Chrome Apps Power API"                            
cordova-plugin-chrome-apps-runtime 1.1.1 "Chrome App Runtime"                             
cordova-plugin-chrome-apps-storage 1.0.4 "Chrome Apps Storage API"                        
cordova-plugin-crosswalk-webview 1.2.0 "Crosswalk WebView Engine"                         
cordova-plugin-customevent-polyfill 1.0.5-dev "CustomEvent constuctor shim"               
cordova-plugin-google-open-source-ios 1.7.1 "Google Open Source iOS Framework Plugin"     
cordova-plugin-google-payments 2.1.1 "Chrome Payments API"                                
cordova-plugin-google-plus-ios 1.7.2 "Google Plus iOS Framework Plugin"                   
cordova-plugin-whitelist 1.0.0 "Whitelist"                                                
cordova-plugin-xhr-blob-polyfill 1.0.3 "XHR Blob Response Type Polyfill"                  
de.appplant.cordova.plugin.local-notification 0.8.0dev "LocalNotification"                
es.keensoft.fullscreenimage 1.0.0 "Full Screen Image"                                     
io.gvox.plugin.phonecalltrap 0.1.0 "PhoneCallTrap"                                        
nl.x-services.plugins.insomnia 4.0.1 "Insomnia (prevent screen sleep)"                    
nl.x-services.plugins.socialsharing 4.3.2 "SocialSharing"                                 
nl.x-services.plugins.toast 2.0 "Toast"                                                   
org.apache.cordova.camera 0.3.6 "Camera"                                                  
org.apache.cordova.device 0.2.12 "Device"                                                 
org.apache.cordova.file 1.3.3 "File"                                                      
org.apache.cordova.file-transfer 0.5.0 "File Transfer"                                    
org.apache.cordova.inappbrowser 0.6.0 "InAppBrowser"                                      
org.apache.cordova.network-information 0.2.15 "Network Information"                       
org.apache.cordova.splashscreen 1.0.0 "Splashscreen"                                      
org.apache.cordova.statusbar 0.1.10 "StatusBar"                                           
org.chromium.cca-hooks 0.0.0 "undefined"                                                  
org.chromium.filechooser 1.0.2 "File Chooser"                                             
imskull commented 9 years ago

Okey, I fixed it:

cca plugin remove com.google.playservices
cca plugin remove android.support.v4