Plugins loaded multiple times and build processes fails - phonegap-plugins

For some reason, I'm experiencing that my phonegap project is generating a lot of different, including the lacking ability to build.
I have the following config:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.example.qrreader" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>My Example QR Reader</name>
<description>
Example QR Reader
</description>
<author email="me#example.com" href="http://example.com">
Repox
</author>
<content src="index.html" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="14" />
<preference name="android-build-tool" value="gradle" />
<preference name="orientation" value="portrait" />
<plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1" />
<plugin name="cordova-plugin-camera" source="npm" spec="~2.1.1" />
<plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0" />
<plugin name="cordova-plugin-console" source="npm" spec="~1.0.2" />
<plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1" />
<plugin name="cordova-plugin-device" source="npm" spec="~1.1.1" />
<plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0" />
<plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2" />
<plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0" />
<plugin name="cordova-plugin-file" source="npm" spec="~4.1.1" />
<plugin name="cordova-plugin-file-transfer" source="npm" spec="~1.5.0" />
<plugin name="cordova-plugin-geolocation" source="npm" spec="~2.1.0" />
<plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3" />
<plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0" />
<plugin name="cordova-plugin-media" source="npm" spec="~2.2.0" />
<plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0" />
<plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.1" />
<plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2" />
<plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0" />
<plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />
<plugin name="phonegap-plugin-barcodescanner" spec="~6.0.6" />
<plugin name="cordova-plugin-qrscanner" spec="~2.5.0" />
<icon src="www/res/icon.png" />
<icon gap:platform="ios" height="60" src="www/res/icons/ios/icon-60.png" width="60" />
<icon gap:platform="ios" height="120" src="www/res/icons/ios/icon-60-2x.png" width="120" />
<icon gap:platform="ios" height="180" src="www/res/icons/ios/icon-60-3x.png" width="180" />
<icon gap:platform="ios" height="76" src="www/res/icons/ios/icon-76.png" width="76" />
<icon gap:platform="ios" height="152" src="www/res/icons/ios/icon-76-2x.png" width="152" />
<icon gap:platform="ios" height="40" src="www/res/icons/ios/icon-40.png" width="40" />
<icon gap:platform="ios" height="80" src="www/res/icons/ios/icon-40-2x.png" width="80" />
<icon gap:platform="ios" height="57" src="www/res/icons/ios/icon-57.png" width="57" />
<icon gap:platform="ios" height="114" src="www/res/icons/ios/icon-57-2x.png" width="114" />
<icon gap:platform="ios" height="72" src="www/res/icons/ios/icon-72.png" width="72" />
<icon gap:platform="ios" height="144" src="www/res/icons/ios/icon-72-2x.png" width="144" />
<icon gap:platform="ios" height="29" src="www/res/icons/ios/icon-small.png" width="29" />
<icon gap:platform="ios" height="58" src="www/res/icons/ios/icon-small-2x.png" width="58" />
<icon gap:platform="ios" height="50" src="www/res/icons/ios/icon-50.png" width="50" />
<icon gap:platform="ios" height="100" src="www/res/icons/ios/icon-50-2x.png" width="100" />
<icon gap:platform="android" gap:qualifier="ldpi" src="www/res/icons/android/icon-36-ldpi.png" />
<icon gap:platform="android" gap:qualifier="mdpi" src="www/res/icons/android/icon-48-mdpi.png" />
<icon gap:platform="android" gap:qualifier="hdpi" src="www/res/icons/android/icon-72-hdpi.png" />
<icon gap:platform="android" gap:qualifier="xhdpi" src="www/res/icons/android/icon-96-xhdpi.png" />
<icon gap:platform="android" gap:qualifier="xxhdpi" src="www/res/icons/android/icon-144-xxhdpi.png" />
<icon gap:platform="android" gap:qualifier="xxxhdpi" src="www/res/icons/android/icon-192-xxxhdpi.png" />
<splash src="www/res/splash.png" />
<splash gap:platform="ios" height="480" src="www/res/screens/ios/screen-iphone-portrait.png" width="320" />
<splash gap:platform="ios" height="960" src="www/res/screens/ios/screen-iphone-portrait-2x.png" width="640" />
<splash gap:platform="ios" height="1024" src="www/res/screens/ios/screen-ipad-portrait.png" width="768" />
<splash gap:platform="ios" height="2048" src="www/res/screens/ios/screen-ipad-portrait-2x.png" width="1536" />
<splash gap:platform="ios" height="768" src="www/res/screens/ios/screen-ipad-landscape.png" width="1024" />
<splash gap:platform="ios" height="1536" src="www/res/screens/ios/screen-ipad-landscape-2x.png" width="2048" />
<splash gap:platform="ios" height="1136" src="www/res/screens/ios/screen-iphone-568h-2x.png" width="640" />
<splash gap:platform="ios" height="1334" src="www/res/screens/ios/screen-iphone-portrait-667h.png" width="750" />
<splash gap:platform="ios" height="2208" src="www/res/screens/ios/screen-iphone-portrait-736h.png" width="1242" />
<splash gap:platform="ios" height="1242" src="www/res/screens/ios/screen-iphone-landscape-736h.png" width="2208" />
<splash gap:platform="android" gap:qualifier="land-hdpi" src="www/res/screens/android/screen-hdpi-landscape.png" />
<splash gap:platform="android" gap:qualifier="land-ldpi" src="www/res/screens/android/screen-ldpi-landscape.png" />
<splash gap:platform="android" gap:qualifier="land-mdpi" src="www/res/screens/android/screen-mdpi-landscape.png" />
<splash gap:platform="android" gap:qualifier="land-xhdpi" src="www/res/screens/android/screen-xhdpi-landscape.png" />
<splash gap:platform="android" gap:qualifier="port-hdpi" src="www/res/screens/android/screen-hdpi-portrait.png" />
<splash gap:platform="android" gap:qualifier="port-ldpi" src="www/res/screens/android/screen-ldpi-portrait.png" />
<splash gap:platform="android" gap:qualifier="port-mdpi" src="www/res/screens/android/screen-mdpi-portrait.png" />
<splash gap:platform="android" gap:qualifier="port-xhdpi" src="www/res/screens/android/screen-xhdpi-portrait.png" />
<access origin="*" />
<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>
<gap:config-file platform="ios" parent="NSCameraUsageDescription" overwrite="true">
<string>To read QR codes</string>
</gap:config-file>
</widget>
With the plain example HTML file, the console tells me that my application is trying to load the cordova plugins multiple times:
...
Uncaught module cordova-plugin-vibration.notification already defined
define # cordova.js:79
(anonymous) # vibration.js:1
cordova.js:79 Uncaught module cordova-plugin-vibration.notification already defined
define # cordova.js:79
(anonymous) # vibration.js:1
cordova.js:79 Uncaught module cordova-plugin-vibration.Vibration already defined
define # cordova.js:79
(anonymous) # Vibration.js:1
cordova.js:79 Uncaught module cordova-plugin-vibration.Vibration already defined
define # cordova.js:79
(anonymous) # Vibration.js:1
cordova.js:79 Uncaught module cordova-plugin-vibration.Vibration already defined
define # cordova.js:79
(anonymous) # Vibration.js:1
cordova.js:79 Uncaught module cordova-plugin-vibration.Vibration already defined
define # cordova.js:79
(anonymous) # Vibration.js:1
cordova.js:79 Uncaught module cordova-plugin-vibration.Vibration already defined
define # cordova.js:79
(anonymous) # Vibration.js:1
cordova.js:79 Uncaught module cordova-plugin-vibration.Vibration already defined
define # cordova.js:79
(anonymous) # Vibration.js:1
cordova.js:79 Uncaught module cordova-plugin-qrscanner.QRScanner already defined
define # cordova.js:79
(anonymous) # www.min.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScanner already defined
define # cordova.js:79
(anonymous) # barcodescanner.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScanner already defined
define # cordova.js:79
(anonymous) # barcodescanner.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScanner already defined
define # cordova.js:79
(anonymous) # barcodescanner.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScanner already defined
define # cordova.js:79
(anonymous) # barcodescanner.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScanner already defined
define # cordova.js:79
(anonymous) # barcodescanner.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScanner already defined
define # cordova.js:79
(anonymous) # barcodescanner.js:1
cordova.js:79 Uncaught module cordova-plugin-qrscanner.QRScannerProxy already defined
define # cordova.js:79
(anonymous) # plugin.min.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScannerProxy already defined
define # cordova.js:79
(anonymous) # BarcodeScannerProxy.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScannerProxy already defined
define # cordova.js:79
(anonymous) # BarcodeScannerProxy.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScannerProxy already defined
define # cordova.js:79
(anonymous) # BarcodeScannerProxy.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScannerProxy already defined
define # cordova.js:79
(anonymous) # BarcodeScannerProxy.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScannerProxy already defined
define # cordova.js:79
(anonymous) # BarcodeScannerProxy.js:1
cordova.js:79 Uncaught module phonegap-plugin-barcodescanner.BarcodeScannerProxy already defined
....
I suspect that these things also causes my builds to fail; I can no longer build my IOS or Android apps via Phonegap Build.
The log for the android built says the following:
BUILD FAILED
Total time: 13.921 secs
Error: /project/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/project/AndroidManifest.xml:31:5-90 Error:
Element uses-permission#android.permission.CAMERA at AndroidManifest.xml:31:5-90 duplicated with element declared at AndroidManifest.xml:28:5-65
/project/AndroidManifest.xml:32:5-85 Error:
Element uses-feature#android.hardware.camera at AndroidManifest.xml:32:5-85 duplicated with element declared at AndroidManifest.xml:30:5-84
/project/AndroidManifest.xml Error:
Validation failed, exiting
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
I have no idea where to look for solutions for my issues; I can't figure out why the modules are trying to load multiple times nor why the builds suddenly fails.

From searching around, it appears as though you've stumbled upon an interesting Android issue. Basically, two or more referenced plugins are adding duplicate permission entries to the AndroidManifest.xml file similar to:
<uses-permission android:name="android.permission.CAMERA" />
Unfortunately, since you're using PhoneGap Build, you can't edit the AndroidManifest file. Using your config above, I was able to build successfully by removing the Barcode Scanner plugin line:
<plugin name="phonegap-plugin-barcodescanner" spec="~6.0.6" />
I'm guessing that the QR Scanner and Camera plugins also specify CAMERA permissions. Do you need all three? One plugin may bundle in the others' functionality. Otherwise, you'd need to fork the plugin(s), update their AndroidManifest permissions and recompile them - not an easy task.

Related

Failed to restore plugin "NetworkStatus" from config.xml. You might need to try adding it again. Error: Error: npm: Command failed with exit code 1

I'm trying to build an Android APK in Ionic but I'm getting the following error:
Discovered saved plugin "NetworkStatus". Adding it to the project
Failed to restore plugin "NetworkStatus" from config.xml. You might need to try adding it again. Error: Error: npm: Command failed with exit code 1
Error output:
npm ERR! code E404
npm ERR! 404 'NetworkStatus' is not in the npm registry.
npm ERR! 404 name can no longer contain capital letters
npm ERR! 404
npm ERR! 404 'NetworkStatus#latest' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because
npm ERR! 404 1. name can no longer contain capital letters
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\IONIC\AppData\Roaming\npm-cache\_logs\2019-10-11T20_47_57_623Z-debug.log`
I'm using the following command to build the release APK:
ionic cordova build android --prod --release
also my config.xml look like:
<?xml version='1.0' encoding='utf-8'?><widget id="io.ionic.starter" version="0.0.1"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>App</name>
<description>Descreption</description>
<author email="info#demo.com" href="http://demo.com/">App</author>
<content src="index.html" />
<access origin="*" />
<access launch-external="yes" origin="whatsapp//*" />
<allow-intent href="whatsapp:*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="19" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:networkSecurityConfig="#xml/network_security_config" />
</edit-config>
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon#2x.png" width="114" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small#3x.png" width="87" />
<icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
<icon height="40" src="resources/ios/icon/icon-20#2x.png" width="40" />
<icon height="60" src="resources/ios/icon/icon-20#3x.png" width="60" />
<icon height="48" src="resources/ios/icon/icon-24#2x.png" width="48" />
<icon height="55" src="resources/ios/icon/icon-27.5#2x.png" width="55" />
<icon height="29" src="resources/ios/icon/icon-29.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-29#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-29#3x.png" width="87" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40#2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40#3x.png" width="120" />
<icon height="88" src="resources/ios/icon/icon-44#2x.png" width="88" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50#2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60#2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60#3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72#2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76#2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5#2x.png" width="167" />
<icon height="172" src="resources/ios/icon/icon-86#2x.png" width="172" />
<icon height="196" src="resources/ios/icon/icon-98#2x.png" width="196" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="960" src="resources/ios/splash/Default#2x~iphone.png" width="640" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="2048" src="resources/ios/splash/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="1536" src="resources/ios/splash/Default-Landscape#2x~ipad.png" width="2048" />
<splash height="2732" src="resources/ios/splash/Default-Portrait#~ipadpro.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape#~ipadpro.png" width="2732" />
<splash height="1136" src="resources/ios/splash/Default-568h#2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
<splash height="2732" src="resources/ios/splash/Default#2x~universal~anyany.png" width="2732" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager" />
I'm using rest api in this project to get data from database & post data to database. but it gives the error at the time of build apk or run apk.
You are using the very old Cordova syntax (From 2.9.0) for Android as stated here.
First, remove the latest line in the config.xml:
<plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager" />
Then, make sure you have the updated Cordova using cordova -v. If it needs an update, update your global Cordova to the latest npm update -g cordova, then update the platforms and plugins.
For more info, you can check How to update Cordova?
After updating Cordova, install the network information cordova-plugin-network-information plugin. You can check the documentation in the Ionic Docs for more details and how to use it.

Phonegap shows error - “Oh geez. Your build failed.”

I am using Phonegap Build for my Android app and am running into the following error when compiling:
Oh geez. Your build failed. Click the "Log" button above to view the compile log. If you need help diagnosing the issue, you can post to the support forum with your App ID.
XML
<?xml version="1.0" encoding="utf-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
xmlns:android = "http://schemas.android.com/apk/res/android"
id = "kmcrs.mobibbhvle.app"
versionCode = "22"
version = "2.2">
<name>bobile App</name>
<description>
bobile mobile app version
</description>
<author email="mmakhan669#gmail.com" href="ujairo.com">
Ujairo.com
</author>
<content src="index.html" />
<preference name="orientation" value="portrait" />
<preference name="android-build-tool" value="gradle" />
<preference name="phonegap-version" value="cli-7.1.0" />
<gap:plugin name="cordova-plugin-whitelist" source="npm" />
<gap:plugin name="phonegap-plugin-push" source="npm" spec="1.11.1" />
<gap:plugin name="cordova-plugin-device" source="npm" />
<gap:plugin name="cordova-plugin-inappbrowser" source="npm" />
<gap:plugin name="cordova-plugin-splashscreen" source="npm" />
<gap:plugin name="cordova-plugin-geolocation" source="npm" spec="1.0.1" />
<gap:plugin name="cordova-plugin-network-information" source="npm" />
<gap:plugin name="cordova-plugin-request-location-accuracy" source="npm" spec="2.2.3" />
<gap:plugin name="cordova-plugin-x-toast" source="npm" spec="2.6.2" />
<gap:plugin name="cordova-plugin-media" source="npm" spec="5.0.0" />
<gap:plugin name="cordova.plugins.diagnostic" source="npm" spec="4.0.8" />
<gap:plugin name="cordova-plugin-googlemaps" source="npm" spec="2.3.10" >
<param name="API_KEY_FOR_ANDROID" value="AIzaSyBSkBzEjEwIC-0uuJmNVvBgC4Lomn1qX2k" />
<param name="API_KEY_FOR_IOS" value="your key" />
<param name="LOCATION_WHEN_IN_USE_DESCRIPTION" value="Karenderia wants to use your location" />
<param name="LOCATION_ALWAYS_USAGE_DESCRIPTION" value="Karenderia want to always use your location" />
</gap:plugin>
<gap:plugin name="cordova-plugin-buildinfo" source="npm" spec="2.0.2" />
<gap:plugin name="cordova-plugin-googleplus" source="npm">
<variable name="REVERSED_CLIENT_ID" value="" />
</gap:plugin>
<platform name="android" />
<platform name="ios" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="fullscreen" value="false" />
<preference name="android-minSdkVersion" value="16" />
<preference name="ShowSplashScreenSpinner" value="false" />
<access origin="*" />
<access origin="tel:*" launch-external="yes" />
<gap:config-file platform="android" parent="/manifest">
<supports-screens android:xlargeScreens="true" android:largeScreens="true" android:smallScreens="true" />
<application android:theme="#android:style/Theme.NoTitleBar" >
</application>
</gap:config-file>
<preference name="phonegap-version" value="cli-7.1.0" />
<gap:plugin name="cordova-plugin-camera" source="npm" spec="2.4.1" />
<platform name="ios">
<config-file platform="ios" target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
<string>Karenderia want to always use your location</string>
</config-file>
<config-file platform="ios" target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string>Karenderia wants to use your location</string>
</config-file>
</platform>
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
<string>need camera access to take pictures</string>
</edit-config>
<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
<string>need to photo library access to get pictures from there</string>
</edit-config>
<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
<string>need location access to find things nearby</string>
</edit-config>
<edit-config target="NSPhotoLibraryAddUsageDescription" file="*-Info.plist" mode="merge">
<string>need to photo library access to save pictures there</string>
</edit-config>
<platform name="android">
<resource-file src="www/beep.wav" target="res/raw/beep.wav" />
<icon density="ldpi" src="res/icons/android/drawable-ldpi-icon.png" />
<icon density="mdpi" src="res/icons/android/drawable-mdpi-icon.png" />
<icon density="hdpi" src="res/icons/android/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="res/icons/android/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="res/icons/android/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="res/icons/android/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="res/screens/android/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="res/screens/android/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="res/screens/android/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="res/screens/android/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="res/screens/android/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="res/screens/android/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="res/screens/android/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="res/screens/android/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="res/screens/android/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="res/screens/android/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="res/screens/android/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="res/screens/android/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<icon height="57" platform="ios" src="res/icons/ios/icon.png" width="57" />
<icon height="114" platform="ios" src="res/icons/ios/icon#2x.png" width="114" />
<icon height="40" platform="ios" src="res/icons/ios/icon-40.png" width="40" />
<icon height="80" platform="ios" src="res/icons/ios/icon-40#2x.png" width="80" />
<icon height="50" platform="ios" src="res/icons/ios/icon-50.png" width="50" />
<icon height="100" platform="ios" src="res/icons/ios/icon-50#2x.png" width="100" />
<icon height="60" platform="ios" src="res/icons/ios/icon-60.png" width="60" />
<icon height="120" platform="ios" src="res/icons/ios/icon-60#2x.png" width="120" />
<icon height="180" platform="ios" src="res/icons/ios/icon-60#3x.png" width="180" />
<icon height="72" platform="ios" src="res/icons/ios/icon-72.png" width="72" />
<icon height="144" platform="ios" src="res/icons/ios/icon-72#2x.png" width="144" />
<icon height="76" platform="ios" src="res/icons/ios/icon-76.png" width="76" />
<icon height="152" platform="ios" src="res/icons/ios/icon-76#2x.png" width="152" />
<icon height="29" platform="ios" src="res/icons/ios/icon-small.png" width="29" />
<icon height="58" platform="ios" src="res/icons/ios/icon-small#2x.png" width="58" />
<icon height="87" platform="ios" src="res/icons/ios/icon-small#3x.png" width="87" />
<splash height="1136" platform="ios" src="res/screens/ios/Default-568h#2x~iphone.png" width="640" />
<splash height="1334" platform="ios" src="res/screens/ios/Default-667h.png" width="750" />
<splash height="2208" platform="ios" src="res/screens/ios/Default-736h.png" width="1242" />
<splash height="1242" platform="ios" src="res/screens/ios/Default-Landscape-736h.png" width="2208" />
<splash height="1536" platform="ios" src="res/screens/ios/Default-Landscape#2x~ipad.png" width="2048" />
<splash height="768" platform="ios" src="res/screens/ios/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" platform="ios" src="res/screens/ios/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="1024" platform="ios" src="res/screens/ios/Default-Portrait~ipad.png" width="768" />
<splash height="960" platform="ios" src="res/screens/ios/Default#2x~iphone.png" width="640" />
<splash height="480" platform="ios" src="res/screens/ios/Default~iphone.png" width="320" />
</platform>
</widget>
Compile logs here.
If you scroll all the way down in your logs, you will see multiple error message:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /build/intermediates/exploded-aar/tbxml-android/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="za.co.twyst" to force usage
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 7.29 secs
Error: /gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/AndroidManifest.xml:38:5-74 Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /build/intermediates/exploded-aar/tbxml-android/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="za.co.twyst" to force usage
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:tbxml-android:] /build/intermediates/exploded-aar/tbxml-android/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="za.co.twyst" to force usage
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
at ChildProcess.whenDone (/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
They all point to the same issue, there is something (most probably a plugin) that requires minimum SDK version 16, while the minimum of the project is 19. The minimum SDK version of 19 is set by the cordova-plugin-googlemaps plugin. You'll have to find out which of these plugins requires minimum SDK version 16 and see if there is an update available.

Data is not fetching from API in IONIC app in android device, Chrome it works fine

I am new to ionic framework. I am working on project using ionic 1, I have created side menu app.
In this am fetching play list data from database when playlists controller loads, I am using nodejs and Mongodb as backend. In chrome(IONIC Serve) it is fetching data from db but when I run into android device(ionic cordova run android) it is not loading API.
I am unable to find what went wrong, I have referred stackoverflow and many article but couldn't.
I have seen many of them facing this issue, I had tried what they are telling to do but no luck.
Please help me to find the error.
App.js
var wowzer = angular.module('wowzer', ['ionic'])
wowzer.config(function($stateProvider, $urlRouterProvider, $locationProvider) {
$stateProvider
.state('login', {
url: '/',
templateUrl: 'templates/login.html',
controller: 'AppCtrl'
})
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/menu.html',
controller: 'AppCtrl'
})
.state('app.search', {
url: '/search',
views: {
'menuContent': {
templateUrl: 'templates/search.html'
}
}
})
.state('app.browse', {
url: '/browse',
views: {
'menuContent': {
templateUrl: 'templates/browse.html'
}
}
})
.state('app.playlists', {
url: '/playlists',
views: {
'menuContent': {
templateUrl: 'templates/playlists.html',
controller: 'PlaylistsCtrl'
}
}
})
.state('app.single', {
url: '/playlists/:playlistId',
views: {
'menuContent': {
templateUrl: 'templates/playlist.html'
}
}
});
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/');
});
wowzer.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
});
})
Index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' yourhost.com ws://localhost:35729; style-src 'self' 'unsafe-inline'; media-src *;script-src 'self' localhost:35729 'unsafe-eval' 'unsafe-inline';">
<title></title>
<link rel="manifest" href="manifest.json">
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.log('Error', err));
}
</script>-->
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/logInControllers.js"></script>
<script src="js/playListController.js"></script>
<script src="services/logInServices.js"></script>
</head>
<body ng-app="wowzer">
<ion-nav-view></ion-nav-view>
</body>
</html>
playlistController
wowzer.controller('PlaylistsCtrl', function($scope, logInServices) {
logInServices.fetchAllItem().then(function(response) {
console.log(response.data);
$scope.playlists = response.data;
});
})
.services.js
wowzer.factory('logInServices', function($http) {
userFactory = {};
//User.create(regData);
userFactory.fetchAllItem = function() {
return $http.get('http://localhost:8100/api/fetchdata');
}
return userFactory;
})
AndroidManifest.xml
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="io.ionic.wowzer" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application android:hardwareAccelerated="true" android:icon="#mipmap/icon" android:label="#string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="#android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="#string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />
</manifest>
config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.wowzer" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>WOWZER</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi#ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<access origin="*" />
<allow-navigation href="http://ionic.local/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="ShowSplashScreenSpinner" value="false" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon#2x.png" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40#2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40#3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50#2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60#2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60#3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72#2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76#2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5#2x.png" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small#3x.png" width="87" />
<splash height="1136" src="resources/ios/splash/Default-568h#2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape#2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape#~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait#~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default#2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
</platform>
<engine name="android" spec="^6.2.3" />
<plugin name="cordova-plugin-console" spec="^1.0.5" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="^2.2.1" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
</widget>
Plalist API
module.exports = function(router) {
router.get('/fetchdata', function(req, res) {
var playlists = [
{ title: 'Reggae', id: 1 },
{ title: 'Chill', id: 2 },
{ title: 'Dubstep', id: 3 },
{ title: 'Indie', id: 4 },
{ title: 'Rap', id: 5 },
{ title: 'Cowbell', id: 6 }
];
console.log(playlists);
res.json(playlists);
});
return router;
}
Please help me where I did wrong.
Thanks in advance...
Run with below command, get the console logs.Then you will get an issue it's easy to solve.
ionic run android -l -c -s
-l stands for livereload
-c stands for consolelogs
-s stands for serverlogs
After using the livereload, I didn't face this issue.Try with it.
the problem is due to the fact that by default ionic does not allow http connections .... so to overcome this problem, add to the AndroidManifest.xml file located in /android/app/src/main as follows (sa marche chez moi)
```
<application
android:usesCleartextTraffic="true"
>
```
```
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
```
enter image description here
enter image description here

When implementing a VSPackage (VSIX) for VS2015, how do I get my new commands listed in Options-Keyboard?

I have just created my first VSPackage (since VS2015 doesn't support AddIns).
While I have managed to assign keyboard shortcuts within my VSPackage (using KeyBindings), I have found that the commands themselves do not seem to be listed within the Options-Keyboard tab in Visual Studio.
I notice that the other extensions that I have installed include their commands for assigning within Options-Keyboard.
What must I do to get mine included?
Here are the full contents of my VSCT file - apologies if there's a better way to attach this, but I couldn't find one:
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This is the file that defines the actual layout and type of the commands.
It is divided in different sections (e.g. command definition, command
placement, ...), with each defining a specific set of properties.
See the comment before each section for more details about how to
use it. -->
<!-- The VSCT compiler (the tool that translates this file into the binary
format that VisualStudio will consume) has the ability to run a preprocessor
on the vsct file; this preprocessor is (usually) the C++ preprocessor, so
it is possible to define includes and macros with the same syntax used
in C++ files. Using this ability of the compiler here, we include some files
defining some of the constants that we will use inside the file. -->
<!--This is the file that defines the IDs for all the commands exposed by VisualStudio. -->
<Extern href="stdidcmd.h" />
<!--This header contains the command ids for the menus provided by the shell. -->
<Extern href="vsshlids.h" />
<!--The Commands section is where commands, menus, and menu groups are defined.
This section uses a Guid to identify the package that provides the command defined inside it. -->
<Commands package="guidDanBarPackage">
<!-- Inside this section we have different sub-sections: one for the menus, another
for the menu groups, one for the buttons (the actual commands), one for the combos
and the last one for the bitmaps used. Each element is identified by a command id that
is a unique pair of guid and numeric identifier; the guid part of the identifier is usually
called "command set" and is used to group different command inside a logically related
group; your package should define its own command set in order to avoid collisions
with command ids defined by other packages. -->
<Menus>
<Menu guid="guidDanBarPackageCmdSet" id="MyToolbar" type="Toolbar">
<CommandFlag>DefaultDocked</CommandFlag>
<Strings>
<ButtonText>Dan Bar</ButtonText>
<CommandName>Dan Bar</CommandName>
</Strings>
</Menu>
</Menus>
<Menus>
<Menu guid="guidDanBarPackageCmdSet" id="BriefToolbar" type="Toolbar">
<CommandFlag>DefaultDocked</CommandFlag>
<Strings>
<ButtonText>Dan Brief Bar</ButtonText>
<CommandName>Dan Brief Bar</CommandName>
</Strings>
</Menu>
</Menus>
<!-- In this section you can define new menu groups. A menu group is a container for
other menus or buttons (commands); from a visual point of view you can see the
group as the part of a menu contained between two lines. The parent of a group
must be a menu. -->
<Groups>
<Group guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" priority="0x0000">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbar" />
</Group>
<Group guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" priority="0x0000">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbar" />
</Group>
</Groups>
<!--Buttons section. -->
<!--This section defines the elements the user can interact with, like a menu command or a button
or combo box in a toolbar. -->
<Buttons>
<!--To define a menu group you have to specify its ID, the parent menu and its display priority.
The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use
the CommandFlag node.
You can add more than one CommandFlag node e.g.:
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
If you do not want an image next to your command, remove the Icon node /> -->
<Button guid="guidDanBarPackageCmdSet" id="cmdidConcurrentBuilds" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic1" />
<Strings>
<ButtonText>Set Concurrent Builds</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidTrackInSolutionExplorer" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic2" />
<Strings>
<ButtonText>Track In Solution Explorer</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBuildStartupProject" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic3" />
<Strings>
<ButtonText>Build Startup Project</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidCommentOutParam" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic4" />
<Strings>
<ButtonText>Comment Out Parameter</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidInsertRegion" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic5" />
<Strings>
<ButtonText>Insert Region</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentFull" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic6" />
<Strings>
<ButtonText>Full XML Comment</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentSmall" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic7" />
<Strings>
<ButtonText>Small XML Comment</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentTiny" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic8" />
<Strings>
<ButtonText>Tiny XML Comment</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentMember" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic9" />
<Strings>
<ButtonText>Member XML Comment</ButtonText>
</Strings>
</Button>
<Button guid="guidVSStd97" id="cmdidMoreWindows" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic10" />
<Strings>
<ButtonText>Win...</ButtonText>
</Strings>
</Button>
<!--BRIEF buttons-->
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefAltD" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic1" />
<Strings>
<ButtonText>Brief Alt D - Line Delete</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefAltMinus" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic3" />
<Strings>
<ButtonText>Brief Num-Minus - Line Cut</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefAltPlus" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic4" />
<Strings>
<ButtonText>Brief Num-Plus - Line Copy</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefAltC" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic2" />
<Strings>
<ButtonText>Brief Alt C - Block Select</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefLinePaste" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic5" />
<Strings>
<ButtonText>Brief Insert - Line Paste</ButtonText>
</Strings>
</Button>
</Buttons>
<!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
<Bitmaps>
<!-- The bitmap id is defined in a way that is a little bit different from the others:
the declaration starts with a guid for the bitmap strip, then there is the resource id of the
bitmap strip containing the bitmaps and then there are the numeric ids of the elements used
inside a button definition. An important aspect of this declaration is that the element id
must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
<Bitmap guid="guidDanBarImages" href="Resources\DanBar.png" usedList="bmpPic1, bmpPic2, bmpPic3, bmpPic4, bmpPic5, bmpPic6, bmpPic7, bmpPic8, bmpPic9, bmpPic10" />
<Bitmap guid="guidBriefBarImages" href="Resources\BriefBar.png" usedList="bmpPic1, bmpPic2, bmpPic3, bmpPic4, bmpPic5, bmpPic6" />
</Bitmaps>
</Commands>
<KeyBindings>
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentSmall" editor="guidVSStd97" key1="q" mod1="Alt" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefAltD" editor="guidVSStd97" key1="d" mod1="Alt" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefAltMinus" editor="guidVSStd97" key1="VK_SUBTRACT" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefAltPlus" editor="guidVSStd97" key1="VK_ADD" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefAltC" editor="guidVSStd97" key1="c" mod1="Alt" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefLinePaste" editor="guidVSStd97" key1="VK_INSERT" />
</KeyBindings>
<Symbols>
<!-- This is the package guid. -->
<GuidSymbol name="guidDanBarPackage" value="{69fa005b-6bae-4a69-84e6-ed7cf75cc180}" />
<!-- This is the guid used to group the menu commands together -->
<GuidSymbol name="guidDanBarPackageCmdSet" value="{a2ce5715-189e-4bfc-bc37-4d1b6e0c1122}">
<IDSymbol name="MyToolbar" value="0x1000" />
<IDSymbol name="MyToolbarGroup" value="0x1050" />
<IDSymbol name="BriefToolbar" value="0x1100" />
<IDSymbol name="BriefToolbarGroup" value="0x1150" />
<IDSymbol name="cmdidConcurrentBuilds" value="256" />
<IDSymbol name="cmdidTrackInSolutionExplorer" value="257" />
<IDSymbol name="cmdidBuildStartupProject" value="258" />
<IDSymbol name="cmdidCommentOutParam" value="259" />
<IDSymbol name="cmdidXMLCommentFull" value="260" />
<IDSymbol name="cmdidXMLCommentSmall" value="261" />
<IDSymbol name="cmdidXMLCommentTiny" value="262" />
<IDSymbol name="cmdidXMLCommentMember" value="263" />
<IDSymbol name="cmdidInsertRegion" value="264" />
<IDSymbol name="cmdidBriefAltD" value="270" />
<IDSymbol name="cmdidBriefAltMinus" value="271" />
<IDSymbol name="cmdidBriefAltPlus" value="272" />
<IDSymbol name="cmdidBriefAltC" value="273" />
<IDSymbol name="cmdidBriefLinePaste" value="274" />
</GuidSymbol>
<GuidSymbol name="guidDanBarImages" value="{ffb25733-9517-4411-bae2-4deda791fd6c}">
<IDSymbol name="bmpPic1" value="1" />
<IDSymbol name="bmpPic2" value="2" />
<IDSymbol name="bmpPic3" value="3" />
<IDSymbol name="bmpPic4" value="4" />
<IDSymbol name="bmpPic5" value="5" />
<IDSymbol name="bmpPic6" value="6" />
<IDSymbol name="bmpPic7" value="7" />
<IDSymbol name="bmpPic8" value="8" />
<IDSymbol name="bmpPic9" value="9" />
<IDSymbol name="bmpPic10" value="10" />
</GuidSymbol>
<GuidSymbol name="guidBriefBarImages" value="{f1a36fcd-2c27-4151-ae23-42fff88c212c}">
<IDSymbol name="bmpPic1" value="1" />
<IDSymbol name="bmpPic2" value="2" />
<IDSymbol name="bmpPic3" value="3" />
<IDSymbol name="bmpPic4" value="4" />
<IDSymbol name="bmpPic5" value="5" />
<IDSymbol name="bmpPic6" value="6" />
</GuidSymbol>
</Symbols>
</CommandTable>
Usually, a command belongs to a menu and is included in Options-Keyboard from this menu. As your commands belong only to a toolbar, this is not the case.
You can add the LocCanonicalName tag to your .vsct button definitions to include your commands to Options-Keyboard like this:
<Strings>
<LocCanonicalName>DanBar.TrackInSolutionExplorer</LocCanonicalName>
<ButtonText>Track In Solution Explorer</ButtonText>
</Strings>
You should define your commands in Visual Studio Command Table (.vsct) file and create event handlers for them in code. See Commands, Menus, and Toolbars.
VS 2015 includes the Custom Command template that you can add to your project to quickly get started:

PhoneGap build. Why isn't my config.xml information showing with my build? No errors

I uploaded a zipped folder with my config.xml file in the root. I don't get any build errors. After the build it doesn't show any plugins, any icons, any information in my config.xml file whatsoever. The only notification I get is "This app isn't using the latest version of PhoneGap. We recommend upgrading to 3.7.0." — in fact, it shows PhoneGap Build 3.3.0.
<?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.parker.products.2015"
versionCode="1"
version = "0.0.1">
<name>Products</name>
<description>Easily view Parker Aerospace products and component information on iOS devices for reference or convenient use with customers and industry colleagues.</description>
<gap:platform name="ios" />
<preference name="phonegap-version" value="3.7.0" />
<preference name="orientation" value="default" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="false" />
<preference name="DisallowOverscroll" value="true"/>
<preference name="disallowOverscroll" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="prerendered-icon" value="true" />
<icon src="res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="res/icon/ios/icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="res/icon/ios/icon-120.png" gap:platform="ios" width="120" height="120" />
<icon src="res/icon/ios/icon-152.png" gap:platform="ios" width="152" height="152" />
<gap:splash src="res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="res/screen/ios/screen-iphone-landscape.png" gap:platform="ios" width="480" height="320" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="res/screen/ios/screen-iphone-landscape-2x.png" gap:platform="ios" width="960" height="640" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024 " />
<gap:splash src="res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />
<gap:splash src="res/screen/ios/screen-ipad-portrait-2x.png" gap:platform="ios" width="1536" height="2008" />
<gap:splash src="res/screen/ios/screen-ipad-landscape-2x.png" gap:platform="ios" width="2048" height="1496" />
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="de.appplant.cordova.plugin.email-composer" />
<gap:plugin name="org.apache.cordova.network-information" />
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:plugin name="com.phonegap.plugin.statusbar" />
</widget>
I've been trying to figure this out for days. Any ideas?
#Lisa, sometimes when the compiler fails, it drops references after that. Try removing all your plugins and add them back one at a time. It is tedious, but I found one bug like that. NOTE: It might be easier to start with a blank App, then to use the one you've put hours into.
FWIW: I do every plugin in a simple App, then add it to my main App. This allows me to test that plugin for bugs, then when I find them (bugs) I do less backtracking. It works sometimes. --Jesse

Resources