Reputation: 2227
I have added notification plugin using this command:
cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications.git
However when I build the App, it fails with below error.
> cordova build android --release
ANDROID_HOME=E:\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_31
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find any version that matches com.android.support:support-v4:+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml
https://repo1.maven.org/maven2/com/android/support/support-v4/
Required by:
:android:unspecified
* 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: 4.119 secs
Error: Error code 1 for command: cmd with args: /s,/c,"E:\PhoneGap\MyApp\platforms\android\gradlew
cdvBuildRelease -b E:\PhoneGap\MyApp\platforms\android\build.gradle
-Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
Upvotes: 1
Views: 1021
Reputation: 2227
Taking cue from @Del I installed the following extra's and the build was successful. I am using Cordova 6.1.1
Upvotes: 0
Reputation: 3039
I have the similar issue, and I achieved a workarround. After creating the platform, open the platform/android folder with android Studio
In the project left tab, left click in android, and select "Open Module Settings"
Go to "Dependencies" Tab, click "+" and "Library Dependency"
Select the "support v4" and click "OK"
Now you can build it.
Also, it could be achieved adding
<framework src="com.android.support:support-v4:+" />
To your config.xml, but it didn't worked for me
Also you have more info here:
https://github.com/phonegap-build/PushPlugin/issues/492
Maybe this helps you.
Please, post your results
Upvotes: 1