I cant build my app anymore...same code was running few weeks ago

  • 1
  • Problem
  • Updated 4 years ago
I am trying to upload the same code but I am getting the following error

Build Date: 2016-03-25 16:39:54 +0000
--------------------------------------------------------------------------------
PLUGIN OUTPUT
--------------------------------------------------------------------------------
Fetching plugin "cordova-plugin-whitelist@1.2.0" via npm
Installing "cordova-plugin-whitelist" at "1.2.0" for android

This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
Fetching plugin "cordova-plugin-statusbar@2.0.0" via npm
Installing "cordova-plugin-statusbar" at "2.0.0" for android
Fetching plugin "phonegap-plugin-push@1.4.4" via npm
Installing "phonegap-plugin-push" at "1.4.4" for android
Fetching plugin "cordova-plugin-camera@1.2.0" via npm
Installing "cordova-plugin-camera" at "1.2.0" for android
Fetching plugin "cordova-plugin-device@1.1.0" via npm
Installing "cordova-plugin-device" at "1.1.0" for android
Fetching plugin "cordova-plugin-device-motion@1.2.0" via npm
Installing "cordova-plugin-device-motion" at "1.2.0" for android
Fetching plugin "cordova-plugin-device-orientation@1.0.2" via npm
Installing "cordova-plugin-device-orientation" at "1.0.2" for android
Fetching plugin "cordova-plugin-dialogs@1.2.0" via npm
Installing "cordova-plugin-dialogs" at "1.2.0" for android
Fetching plugin "cordova-plugin-file@3.0.0" via npm
Installing "cordova-plugin-file" at "3.0.0" for android

The Android Persistent storage location now defaults to "Internal". Please check this plugins README to see if you application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

""

to config.xml in order for the application to find previously stored files.
Fetching plugin "cordova-plugin-file-transfer@1.4.0" via npm
Installing "cordova-plugin-file-transfer" at "1.4.0" for android
Dependent plugin "cordova-plugin-file" already installed on android.
Fetching plugin "cordova-plugin-globalization@1.0.2" via npm
Installing "cordova-plugin-globalization" at "1.0.2" for android
Fetching plugin "cordova-plugin-inappbrowser@1.1.0" via npm
Installing "cordova-plugin-inappbrowser" at "1.1.0" for android
Fetching plugin "cordova-plugin-network-information@1.1.0" via npm
Installing "cordova-plugin-network-information" at "1.1.0" for android
Fetching plugin "cordova-plugin-vibration@2.0.0" via npm
Installing "cordova-plugin-vibration" at "2.0.0" for android
Fetching plugin "cordova-plugin-splashscreen@3.0.0" via npm
Installing "cordova-plugin-splashscreen" at "3.0.0" for android
Fetching plugin "cordova-plugin-x-socialsharing@5.0.7" via npm
Installing "cordova-plugin-x-socialsharing" at "5.0.7" for android
Fetching plugin "cordova-plugin-facebook4@1.4.0" via npm
Installing "cordova-plugin-facebook4" at "1.3.0-0" for android
--------------------------------------------------------------------------------
COMPILE OUTPUT
--------------------------------------------------------------------------------
Build option --'' not recognized (ignoring).
Running: /project/gradlew cdvBuildDebug -b /project/build.gradle -Dorg.gradle.daemon=true -PcdvBuildMultipleApks=false

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'project'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find com.android.support:support-v4:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/an...
https://repo1.maven.org/maven2/com/an...
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
Required by:
:project:unspecified > com.android.support:support-v13:23.1.0
> Could not find com.android.support:support-v4:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/an...
https://repo1.maven.org/maven2/com/an...
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
Required by:
:project:unspecified > com.facebook.android:facebook-android-sdk:4.10.1
> Could not find com.android.support:cardview-v7:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/an...
https://repo1.maven.org/maven2/com/an...
file:/android-sdk/extras/android/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.pom
file:/android-sdk/extras/android/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.jar
file:/android-sdk/extras/google/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.pom
file:/android-sdk/extras/google/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.jar
Required by:
:project:unspecified > com.facebook.android:facebook-android-sdk:4.10.1
> Could not find com.android.support:support-v4:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/an...
https://repo1.maven.org/maven2/com/an...
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
Required by:
:project:unspecified > com.google.android.gms:play-services-gcm:8.4.0 > com.google.android.gms:play-services-base:8.4.0 > com.google.android.gms:play-services-basement:8.4.0

* 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: 3.759 secs

/project/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /project/gradlew with args: cdvBuildDebug,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildMultipleApks=false
Photo of Issam Dal

Issam Dal

  • 5 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
The android.support:support-v4:23.2.0 is not yet included in PGB. The latest is 23.1.1

So, you need to downgrade every plugin that requires 23.2.0
I would suspect that facebook4 plugin. Use the previously released version.
Photo of Andrew U

Andrew U

  • 2 Posts
  • 1 Reply Like
I’m experiencing the same thing with cordova-plugin-facebook4
The latest version that builds now is 1.3.0
1.7.0 worked last week though :(

Not sure of what changed from 1.3.0 to 1.7.0, but it seems to be working for login/register.
Photo of Issam Dal

Issam Dal

  • 5 Posts
  • 0 Reply Likes
I have downgraded the facebook plugin to 1.3.0 and I can run the build without errors:

I guess once phonegap get upgraded will try a newer version of the facebook4 plugin.

thanks guys!
Photo of Patrick Schuler

Patrick Schuler

  • 30 Posts
  • 3 Reply Likes
Can you guys give us a timeline for when you expect the upgrade to take place? Is there a place we can monitor for those updates?
Photo of Patrick Schuler

Patrick Schuler

  • 30 Posts
  • 3 Reply Likes
There must have been another change that breaks this on your side. I'm 100% positive that the 1.5 version did work previously and also newer versions did used to work. Can you please have a look what changed in your environment?
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Patrick,
versions of plugins are controlled by their respective authors. They have their own means for disseminating information.

PGB is base the associated Tools Release. cli-6.0.0 is the currently available leading edge Tools Release. The current default is cli-5.2.0.

For default, see: Docs -> Configuring -> Preferences -> Multi-Platform

With regards to "Libraries" associate with Android Releases, please check the Cordova Blogs

NOTE: Until said "Tool Release" version (or greater) is available on PGB, the associate "Libraries" are not available on PGB.

Best of Luck
Jesse
Photo of Patrick Schuler

Patrick Schuler

  • 30 Posts
  • 3 Reply Likes
@Jesse

Thanks for the reply.

I understand that the plugins can update and change their dependencies. That makes total sense. However, what I'm saying is that a previously published version on npm (1.5 for example used to compile fine on PGB and now fails to compile. Which would indicate to me that there were changes in PGB since the build on npm is stable and hasn't changed (newer versions have been added, but that's not the one I'm trying to include).

1.5 published on npm did compile for me previously. The switch to cli-6.0.0 was done a while ago. Are you saying that the cli-6.0.0 might change without a version change?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Are you saying that the cli-6.0.0 might change without a version change?
Yes.
The PGB folks make changes in between and sometimes don't adjust version numbers. We have seen that, for instance, several days ago when they started enforcing a rule that missing config.xml throw error messages instead of being replaced by a default config.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
...and it just happened again.
A couple of hours ago, they added system library 23.2.0 to Phonegap Build, without:
- increasing the PGB version number
- announcing the change here or in the Blog

Also, this requires androidMinSDK to be set to at least '15'

[I'm afraid once more PGB shows that version management and communication are not its strongest characteristics]
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Patrick,
Petra said it all.
Jesse
Photo of Mateusz Chodkowski

Mateusz Chodkowski

  • 1 Post
  • 0 Reply Likes
Ok guys i've same problem. I am a little fresh in phonegap so can you tell me how to downgrade these plugins?
My errors
http://pastebin.com/wncAYmKN
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Looks like you're building locally. In that case, you might be a bit lost here at the Phonegap Build forum, the place for developers who don't go through the hassle of installing and maintaining node, java, phonegap, SDK's, plugins and whatnot.

You'd probably be better off asking at the Phonegap Google Group.
Photo of Issam Dal

Issam Dal

  • 5 Posts
  • 0 Reply Likes
so which version I should be using now for cordova-plugin-facebook4 to have it work properlly?

cordova-plugin-facebook4 1.3.0 or 1.4.0 or 1.7.0?

thanks,
Issam
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
After the latest unannounced PGB change, you should be able to use 1.7.0
Photo of Issam Dal

Issam Dal

  • 5 Posts
  • 0 Reply Likes
so I have tried 1.4.0 and 1.7.0 and I keep getting the facebook "invalid hash key" error for android devices. I have the same exact hash key in the facebook app page. it works fine with ios apple though.

anyone else have the cordova-plugin-facebook4 working for them in android?