I use Intel XDK and when passing to the new CLI 5.1.1 I got a build error and I can't use anymore your plugin.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:compileArmv7ReleaseJava.../MyApp/platforms/android/src/de/appplant/cordova/plugin/notification/Builder.java:130: error: cannot find symbol
.setColor(options.getColor())
^
symbol: method setColor(int)
location: class Builder
.../MyApp/platforms/android/src/de/appplant/cordova/plugin/notification/Options.java:262: error: cannot find symbol
return NotificationCompat.COLOR_DEFAULT;
^
symbol: variable COLOR_DEFAULT
location: class NotificationCompat
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
FAILED
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Could you please fix it?
Running into the same issue with a different fork of the plugin. The issue is the plugin is shipping with an android-support library that is causing conflicts with other plugins.
To solve it and get a build here are the steps I did:
<lib-file src="libs/android/android-support-v4.jar" />Was able to successfully build and everything works.
I fixed it by installing "Android Support Repository" in the Android SDK Manager
Error
I also had the same error. I inspected the *plugins folder and found some issues:
src/android was empty (other platforms too)www was emptyplugin.xml.There might have been more issues.
My solution
What I did was deleting the plugins folder from:
root/plugins/root/platforms/android/platform_www/plugins/root/platforms/android/src/de/ (I didn't have other plugins from Germany)After that I ran the command: phonegap run android again and the error was gone.
--UPDATE--
@bradrlaw: I have a build-extras.gradle in root/platforms/android to solve the problem with the android-support library.
build-extras.gradle:
configurations { all*.exclude group: 'com.android.support', module: 'support-v4' }
--UPDATE--
*plugins folder = root/plugins/de.appplant.cordova.plugin.local-notification
Same problem here
Same issue for me :(
me too....
I solved temporaly this issue downgrading the plugin version:
ionic plugin remove de.appplant.cordova.plugin.local-notification
ionic plugin add de.appplant.cordova.plugin.[email protected]
Hope this helps.
Thanks for the hint Rodrix. I tried downgrading step-by-step and found that 0.8.2 works OK.
With 0.8.3 and 0.8.4 I'ḿ getting following errors:
COLOR_DEFAULT cannot be resolved or is not a field Options.java /MainActivity/src/de/appplant
/cordova/plugin/notification line 262 Java Problem
DEFAULT_LIGHTS cannot be resolved or is not a field Options.java /MainActivity/src/de/appplant/cordova/plugin/notification line 245 Java Problem
The method setColor(int) is undefined for the type NotificationCompat.Builder Builder.java /MainActivity/src/de/appplant/cordova/plugin/notification line 130 Java Problem
Found it: I was using an outdated version of android-support-v4.jar in my Java build path. Replaced it by the latest version. No build errors anymore!
How I replace the android-support-v4.jar? please help
I had the same problem today,
I am using facebook plugin and I tried to install "cordova-plugin-local-notifications". There is a conflict between those 2 plugin because facebook plugin uses the old version of android-support-v4.jar ...
After 6 hours fight(I shame of it..) I found solution for my app:
I found every single android-support-v4.jar file in my app (it is about 700kb) and changed it with new version. The new version is in android-sdk\extrasandroid\support\v4
I hope it will help for next victims..
(sorrry because of my bad english)
+1
@nickkenens Did you try my solution?
I solved this issue removing file:
/platforms/android/libs/android-support-v4.jar
Is this still an issue otherwise I'll close it.
Most helpful comment
I fixed it by installing "Android Support Repository" in the Android SDK Manager