0
votes

I am trying to use a plugin "cordova-plugin-local-notifications" with phonegap build but I getting build failed error continuously.

I think its happening because of facebook connect plugin but I am not sure.

Following is the log from the build:

Build Date: 2016-05-08 16:06:12 +0000
Executing: ant release -f /project/build.xml
Buildfile: /project/build.xml
Buildfile: /project/build.xml

-set-mode-check:

-set-release-mode:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.1

-setup:
     [echo] Project Name: .ProjectName

-release-obfuscation-check:
     [echo] proguard.config is ${proguard.config}

-pre-build:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.1

-setup:
     [echo] Project Name: .ProjectName
  [gettype] Project Type: Application

-build-setup:
  [gettype] Project Type: Application

-pre-clean:

clean:
[getlibpath] Library dependencies:
[getlibpath] 
[getlibpath] ------------------
[getlibpath] Ordered libraries:
[getbuildtools] Using latest Build Tools: 23.0.1
     [echo] Resolving Build Target for .ProjectName...

nodeps:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.1

-setup:
     [echo] Project Name: .ProjectName
  [gettype] Project Type: Android Library

-pre-clean:

clean:
[gettarget] Project Target:   Android 5.1.1
[gettarget] API level:        22
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /project/bin
    [mkdir] Created dir: /project/bin/res
    [mkdir] Created dir: /project/bin/rsObj
    [mkdir] Created dir: /project/bin/rsLibs
    [mkdir] Created dir: /project/gen
    [mkdir] Created dir: /project/bin/classes
    [mkdir] Created dir: /project/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for .ProjectName...
[dependency] Library dependencies:
[dependency] 
[dependency] ------------------
[dependency] Ordered libraries:
[dependency] 
[dependency] ------------------

nodeps:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.1

-setup:
     [echo] Project Name: .ProjectName
  [gettype] Project Type: Android Library

-pre-clean:

clean:
[dependency] Found 2 versions of android-support-v4.jar in the dependency list,

BUILD SUCCESSFUL
Total time: 1 second
[dependency] but not all the versions are identical (check is based on SHA-1 only at this time).
[dependency] All versions of the libraries must be the same at this time.
[dependency] Versions found are:
[dependency] Path: /project/com.phonegap.plugins.facebookconnect/azzy-FacebookLib/libs/android-support-v4.jar
[dependency]    Length: 758727
[dependency]    SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[dependency] Path: /project/libs/android-support-v4.jar
[dependency]    Length: 19036
[dependency]    SHA-1: bc202617b4c3236673b1e10d23e52c78f7a6de38

BUILD FAILED
/android-sdk/tools/ant/build.xml:573: Jar mismatch! Fix your dependencies

Total time: 1 second

/project/cordova/node_modules/q/q.js:126
                    throw e;
                    ^
Error code 1 for command: ant with args: release,-f,/project/build.xml 

And here is the config.xml file which I am using:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.domain.www" version="0.1.2" xmlns= "http://www.w3.org/ns/widgets"
   xmlns:gap="http://phonegap.com/ns/1.0">
   <name>Name</name>
   <description>
      Social App 
   </description>
   <author email="[email protected]" href="http://www.web.com">
      Name
   </author>
   <feature name="StatusBar">
      <param name="ios-package" value="CDVStatusBar" onload="true" />
   </feature>
   <content src="index.html" />
   <preference name="fullscreen" value="false" />
   <preference name="AndroidPersistentFileLocation" value="Internal" />
   <preference name="iosPersistentFileLocation" value="Library" />
   <preference name="BackupWebStorage" value="none" />
   <preference name="AutoHideSplashScreen" value="false" />
   <preference name="ShowSplashScreenSpinner" value="false" />
   <preference name="StatusBarOverlaysWebView" value="false" />
   <preference name="exit-on-suspend"            value="false" />
   <preference name="CrosswalkAnimatable" value="true" />
   <preference name="xwalkVersion" value="15+" />
   <preference name="DisallowOverscroll" value="true" />
   <preference name="UIWebViewBounce" value="false" />
   <platform name="android" >
      <preference name="orientation" value="portrait" />
   </platform>
   <preference name="orienation" value="portrait" />
   <access origin="*" />
   <access origin="cdvfile://*" />
   <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>
   <allow-navigation href="http://*/*" />
   <gap:plugin name="cordova-plugin-nativeaudio"  source="npm" />
   <gap:plugin name="cordova-plugin-device"  source="npm" />
   <gap:plugin name="cordova-plugin-console"  source="npm" />
   <gap:plugin name="cordova-plugin-whitelist"  source="npm" />
   <gap:plugin name="cordova-plugin-splashscreen"  source="npm" />
   <gap:plugin name="cordova-plugin-statusbar"  source="npm" />
   <gap:plugin name="ionic-plugin-keyboard"  source="npm" />
   <gap:plugin name="cordova-plugin-file"   source="npm" />
   <gap:plugin name="cordova-plugin-file-transfer"   source="npm" />
   <gap:plugin name="cordova-plugin-vibration"  source="npm" />
   <gap:plugin name="cordova-plugin-dialogs"  source="npm" />
   <gap:plugin name="cordova-plugin-screen-orientation"  source="npm" />
   <gap:plugin name="cordova-media-with-compression"  spec="2.0.15" source="npm"  />
   <gap:plugin name="de.appplant.cordova.plugin.local-notification" version="0.8.1" />
   <gap:plugin name="com.telerik.plugins.nativepagetransitions" source="npm" />
   <plugin name="com.phonegap.plugins.facebookconnect" spec="0.9.0" source="pgb">
      <param  name="APP_ID" value="23232323232" />
      <param name="APP_NAME" value="AppName" />
   </plugin>
   <icon src="assets/img/icons/icon.png"  gap:platform="android"   />
   <icon src="res/icon/android/icon-36-ldpi.png"   gap:platform="android"    gap:qualifier="ldpi" />
   <icon src="res/icon/android/icon-48-mdpi.png"   gap:platform="android"    gap:qualifier="mdpi" />
   <icon src="res/icon/android/icon-72-hdpi.png"   gap:platform="android"    gap:qualifier="hdpi" />
   <icon src="res/icon/android/icon-96-xhdpi.png"  gap:platform="android"    gap:qualifier="xhdpi" />
   <icon src="assets/img/icons/icon.png" gap:platform="ios" width="57" height="57" />
   <icon src="assets/img/icons/icon-128.png" width="128" height="128" />
   <icon src="assets/img/icons/icon-256.png" width="256" height="256" gap:role="default" />
   <icon src="assets/img/icons/icon-57.png" gap:platform="ios" width="57" height="57" />
   <icon src="assets/img/icons/icon-120.png" gap:platform="ios" width="120" height="120" />
   <icon src="assets/img/icons/icon-152.png" gap:platform="ios" width="152" height="152" />
   <icon src="assets/img/icons/icon-114.png" gap:platform="ios" width="114" height="114" />
   <icon src="assets/img/icons/icon-76.png" gap:platform="ios" width="76" height="76" />
   <icon src="assets/img/icons/icon-72.png" gap:platform="ios" width="72" height="72" />
   <!-- Define app splash screen for each platform. -->
   <platform name="ios">
      <feature name="Notification">
         <param name="ios-package" value="CDVNotification" />
      </feature>
      -->    <!-- images are determined by width and height. The following are supported -->
      <splash src="assets/img/splash/Default~iphone.png" width="320" height="480"/>
      <splash src="assets/img/splash/Default@2x~iphone.png" width="640" height="960"/>
      <splash src="assets/img/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
      <splash src="assets/img/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
      <splash src="assets/img/splash/Default-Landscape~ipad.png" width="1024" height="768"/>
      <splash src="assets/img/splash/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
      <splash src="assets/img/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
      <splash src="assets/img/splash/Default-667h.png" width="750" height="1334"/>
      <splash src="assets/img/splash/Default-736h.png" width="1242" height="2208"/>
      <splash src="assets/img/splash/Default-Landscape-736h.png" width="2208" height="1242"/>
   </platform>
   <gap:splash src="assets/img/splash/splash.png"  />
   <!-- Following code is to fix issue so facebook login can open in native facebook app instead of safari -->
   <gap:config-file platform="ios" parent="LSApplicationQueriesSchemes" overwrite="true">
      <array>
         <string>fbapi</string>
         <string>fbapi20130214</string>
         <string>fbapi20130410</string>
         <string>fbapi20130702</string>
         <string>fbapi20131010</string>
         <string>fbapi20131219</string>
         <string>fbapi20140410</string>
         <string>fbapi20140116</string>
         <string>fbapi20150313</string>
         <string>fbapi20150629</string>
         <string>fbauth</string>
         <string>fbauth2</string>
         <string>fb-messenger-api20140430</string>
      </array>
   </gap:config-file>
</widget>

I spent several hours to find solution for this issue but in vain. So I would really appreciate any contribution.

Thanks

1

1 Answers

0
votes

The same issue as yours

https://github.com/one-signal/OneSignal-Cordova-SDK/issues/2

Can't use de.appplant.cordova.plugin.local-notification along with com.phonegap.plugins.facebookconnect