首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >LocalNotification安卓

LocalNotification安卓
EN

Stack Overflow用户
提问于 2013-03-15 04:32:39
回答 2查看 1K关注 0票数 0

我正在尝试为我的Phonegap应用程序使用LocalNotification插件。https://github.com/phonegap/phonegap-plugins/tree/master/Android/LocalNotification

在执行完所有步骤之后..我在Localnotification.java中遇到了很多错误。其余的都运行得很好。

有什么问题吗?它已经从第一句话开始:

前两个错误:导入com.phonegap.api.Plugin;导入com.phonegap.api.PluginResult;

第三个错误:公共类LocalNotification扩展了插件{

我只是个初学者..但也许有人能帮上忙...?我是不是遗漏了一个步骤,或者我遗漏了一些必需的文件?

使用Eclipse,最新的cordova/phonegap。

EN

回答 2

Stack Overflow用户

发布于 2013-03-18 05:10:12

在这里看到相同的问题:p

在这里似乎使用了相同的设置,即带有最新的cordova和phonegap的Eclipse。刷新插件后,Eclipse显示30个错误,1个警告,0个其他错误。AlarmReceiver.java中有一个警告和一个错误,其余的错误都在LocalNotification.java中。已按照https://github.com/phonegap/phonegap-plugins/tree/master/Android/LocalNotification的说明进行操作。

“问题”是:

代码语言:javascript
复制
Description Resource Path Location Type
The import com.phonegap.api cannot be resolved LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 12 Java Problem
The import com.phonegap.api cannot be resolved LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 13 Java Problem
ctx cannot be resolved or is not a field LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 35 Java Problem
The method execute(String, JSONArray, String) of type LocalNotification must override or implement a supertype method LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 34 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 34 Java Problem
Plugin cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 23 Java Problem
The method cancelAllNotifications() from the type LocalNotification refers to the missing type PluginResult LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 60 Java Problem
The method cancelNotification(String) from the type LocalNotification refers to the missing type PluginResult LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 57 Java Problem
The method add(boolean, String, String, String, String, Calendar) from the type LocalNotification refers to the missing type PluginResult LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 54 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 38 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 95 Java Problem
PluginResult cannot be resolved to a variable LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 93 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 93 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 83 Java Problem
PluginResult cannot be resolved to a variable LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 111 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 111 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 106 Java Problem
PluginResult cannot be resolved to a variable LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 95 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 132 Java Problem
PluginResult cannot be resolved to a variable LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 132 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 134 Java Problem
PluginResult cannot be resolved to a variable LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 134 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 113 Java Problem
PluginResult cannot be resolved to a variable LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 113 Java Problem
PluginResult cannot be resolved to a type LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 120 Java Problem
ctx cannot be resolved or is not a field LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 128 Java Problem
ctx cannot be resolved or is not a field LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 151 Java Problem
ctx cannot be resolved or is not a field LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 167 Java Problem
ctx cannot be resolved or is not a field LocalNotification.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 180 Java Problem
The method setLatestEventInfo(Context, CharSequence, CharSequence, PendingIntent) from the type Notification is deprecated AlarmReceiver.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 77 Java Problem
R cannot be resolved to a variable AlarmReceiver.java / application_title_mobile/src/com/phonegap/plugin/localnotification line 72 Java Problem

编辑:刚刚在github上发布了一个问题:https://github.com/phonegap/phonegap-plugins/issues/1076

票数 0
EN

Stack Overflow用户

发布于 2013-06-18 01:52:50

我更新了localNotification插件以支持最新的phonegap,也许你想在https://github.com/zhuochun/local-notification上尝试一下

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15419584

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档