###前提・実現したいこと
AndroidStudioでカレンダーを表示する機能を実装したのですが、Buildを行うとエラーが表示され、原因がわかりません。
###発生している問題・エラーメッセージ
Error:(1, 16) エラー: ';'がありません
Error:Execution failed for task ':compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
エラーメッセージ
###該当のソースコード
package cordova-plugin-am-i-late; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.CallbackContext; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; /** * This class echoes a string called from JavaScript. */ public class AmILate extends CordovaPlugin { @Override public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { if (action.equals("getNextAppointment")) { int minutes = args.getInt(0); this.getNextAppointment(minutes, callbackContext); return true; } return false; } private void getNextAppointment(int minutes, CallbackContext callbackContext) { if (minutes > 0) { /** Code to retrieve name, time of next appointment goes here **/ if (foundAppointment) { JSONObject returnObject = new JSONObject(); returnObject.put("title", appointmentTitle); returnObject.put("date", appointmentDate); callbackContext.success(returnObject); } else { // If no appointment was found, return an empty string. // Note that we used success() rather than error(), since // no finding an appointment is perfectly valid. Error // conditions should be reserved for situations where // the plugin was unable to complete its task at all. callbackContext.success(""); } } else { callbackContext.error("minutes must be > 0"); } } }
###試したこと
課題に対してアプローチしたことを記載してください
###補足情報(言語/FW/ツール等のバージョンなど)
より詳細な情報
原因/解決策がわかった方は教えていただけると幸いです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/08 04:45
2016/11/08 05:04 編集
2016/11/08 07:11
2016/11/08 08:22