编译时出错" ant"建立

时间:2016-03-06 15:38:22

标签: android cordova ant localnotification

最近我在我的cordova应用程序中安装了cordova-plugin-local-notifications插件。运行ant debug install命令时出现以下错误:

-compile:
    [javac] Compiling 42 source files to /home/project-path/platforms/android/ant-build/classes
    [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
    [javac] /home/project-path/platforms/android/src/de/appplant/cordova/plugin/notification/Options.java:262: error: cannot find symbol
    [javac]             return NotificationCompat.COLOR_DEFAULT;
    [javac]                                      ^
    [javac]   symbol:   variable COLOR_DEFAULT
    [javac]   location: class NotificationCompat
    [javac] /home/project-path/platforms/android/src/de/appplant/cordova/plugin/notification/Builder.java:130: error: cannot find symbol
    [javac]                 .setColor(options.getColor())
    [javac]                 ^
    [javac]   symbol:   method setColor(int)
    [javac]   location: class Builder
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors
    [javac] 3 warnings

我有什么遗失的吗?请指教。

1 个答案:

答案 0 :(得分:0)

通过向应用添加android-support-v4.jar来解决此问题。