phonegap build app未安装错误

时间:2018-01-22 05:42:48

标签: android cordova phonegap-build phonegap phonegap-cli

在构建和应用程序安装时间之后,它显示错误“已安装的具有冲突签名的同名现有包” 我尝试了很多方法并更改了我的应用程序config.xml,但它不起作用请帮我解决这个问题。吼我附上我的config.xml文件也提前感谢你。

  <?xml version="1.0" encoding="UTF-8"?>

<widget xmlns     = "http://www.w3.org/ns/widgets"   xmlns:gap = "http://phonegap.com/ns/1.0"
        id        = "com.app.sample"
        versionCode = "105"
        version   = "1.0.4">

    <name>Sample</name>
    <description>
        Sample Mobile App
    </description>
    <author href="" email="balay2k11@gmail.com">
        BalaMurugan
    </author>

    <preference name="android-build-tool" value="gradle" />     

    <preference name="permissions"              value="none"/>
    <preference name="useBrowserHistory"        value="true" />
    <preference name="phonegap-version"         value="cli-6.5.0" />
    <preference name="android-minSdkVersion"    value="15" />
    <preference name="android-targetSdkVersion" value="23" />

    <preference name="orientation"                value="portrait" />        <!-- all: default means both landscape and portrait are enabled -->
    <preference name="target-device"              value="universal" />      <!-- all: possible values handset, tablet, or universal -->
    <preference name="fullscreen"                 value="false" />           <!-- all: hides the status bar at the top of the screen -->
    <preference name="webviewbounce"              value="true" />           <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
    <preference name="prerendered-icon"           value="true" />           <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen -->
    <preference name="stay-in-webview"            value="false" />          <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
    <preference name="ios-statusbarstyle"         value="black-opaque" />   <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
    <preference name="detect-data-types"          value="true" />           <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
    <preference name="exit-on-suspend"            value="false" />          <!-- ios: if set to true, app will terminate when home button is pressed -->
    <preference name="show-splash-screen-spinner" value="true" />           <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
    <preference name="auto-hide-splash-screen"    value="true" />           <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
    <preference name="disable-cursor"             value="false" />          <!-- blackberry: prevents a mouse-icon/cursor from being displayed on the app -->
    <preference name="android-installLocation"    value="auto" />           <!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->

    <plugin name="cordova-plugin-battery-status"        source="npm" />
    <plugin name="cordova-plugin-camera"                source="npm"        spec="2.1.1" />
    <plugin name="cordova-plugin-console"               source="npm" />
    <plugin name="cordova-plugin-contacts"              source="npm" />
    <plugin name="cordova-plugin-device"                source="npm" />
    <plugin name="cordova-plugin-device-motion"         source="npm" />
    <plugin name="cordova-plugin-device-orientation"    source="npm" /> 
    <plugin name="cordova-plugin-dialogs"               source="npm" />
    <plugin name="cordova-plugin-file"                  source="npm"        spec="4.3.3" />
    <plugin name="cordova-plugin-file-transfer"         source="npm"        spec="1.6.3" /> 
    <plugin name="cordova-plugin-geolocation"           source="npm" />
    <plugin name="cordova-plugin-globalization"         source="npm" />
    <plugin name="cordova-plugin-inappbrowser"          source="npm" />
    <plugin name="cordova-plugin-legacy-whitelist"      source="npm" /> <!-- NEW -->
    <plugin name="cordova-plugin-media"                 source="npm" />
    <plugin name="cordova-plugin-media-capture"         source="npm" />
    <plugin name="cordova-plugin-network-information"   source="npm" />
    <plugin name="cordova-plugin-splashscreen"          source="npm" />
    <plugin name="cordova-plugin-statusbar"             source="npm" /> <!-- NEW -->
    <plugin name="cordova-plugin-test-framework"        source="npm" /> <!-- NEW -->
    <plugin name="cordova-plugin-vibration"             source="npm" />
    <plugin name="cordova-plugin-whitelist"             source="npm" /> <!-- NEW -->

    <gap:plugin name="cordova-plugin-calendar"          source="npm"        spec="4.4.6"  />
    <gap:plugin name="onesignal-cordova-plugin"         source="npm" /> 
    <gap:plugin name="cordova-plugin-x-toast"           source="npm" />  
    <gap:plugin name="cordova.plugins.diagnostic"       source="npm" /><!-- checking the location enabled or not -->
    <gap:plugin name="cordova-plugin-apprate"           source="npm" /> <!-- app ratting -->
    <gap:plugin name="cordova-plugin-x-socialsharing"   source="npm" /><!-- sharing the app -->


    <icon src="icon.png" />
    <icon src="res/android/icon-36-ldpi.png"   gap:platform="android"    gap:qualifier="ldpi" />
    <icon src="res/android/icon-48-mdpi.png"   gap:platform="android"    gap:qualifier="mdpi" />
    <icon src="res/android/icon-72-hdpi.png"   gap:platform="android"    gap:qualifier="hdpi" />
    <icon src="res/android/icon-96-xhdpi.png"  gap:platform="android"    gap:qualifier="xhdpi" />

    <splash src="splash.png" />
    <gap:splash src="res/screen/android/ldpi.png"                   gap:platform="android"  gap:qualifier="ldpi" />
    <gap:splash src="res/screen/android/mdpi.png"                   gap:platform="android"  gap:qualifier="mdpi" />
    <gap:splash src="res/screen/android/hdpi.png"                   gap:platform="android"  gap:qualifier="hdpi" />
    <gap:splash src="res/screen/android/xhdpi.png"                  gap:platform="android"  gap:qualifier="xhdpi" />
    <gap:splash src="res/screen/android/fr-xhdpi.png"               gap:platform="android"  gap:qualifier="fr-xhdpi" />
    <gap:splash src="res/screen/android/portrait-xxhdpi.png"        gap:platform="android"  gap:qualifier="port-xxhdpi" />
    <gap:splash src="res/screen/android/landscape-xxhdpi.png"       gap:platform="android"  gap:qualifier="land-xxhdpi" />
    <gap:splash src="res/screen/android/xxxhdpi.png"                gap:platform="android"  gap:qualifier="xxxhdpi" />

    <gap:config-file platform="ios" parent="CFBundleShortVersionString">
        <string>100</string>
    </gap:config-file>

    <access origin="*"/>
    <plugin name="cordova-plugin-whitelist" version="1" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
     </platform>
    <feature name="Camera">
        <param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
    </feature>

</widget>

0 个答案:

没有答案