Cordoba: it is not possible to build a project with the calendar corodva-plugin-calendar

I am developing a cordova application in which I want to have some kind of booking function through the calendar. Therefore, for this I installed the very famous EddyVerbruggen / Calendar-PhoneGap-Plugin plugin.

But when creating a project, he throws the following error

/home/admin/Desktop/myApp/platforms/android/src/nl/xservices/plugins/Calendar.java:148: error: cannot find symbol if (PackageManager.PERMISSION_GRANTED != ContextCompat.checkSelfPermission(this.cordova.getActivity(), type)) { ^ symbol: method checkSelfPermission(Activity,String) location: class ContextCompat /home/admin/Desktop/myApp/platforms/android/src/nl/xservices/plugins/Calendar.java:157: error: cannot find symbol ActivityCompat.requestPermissions( ^ symbol: method requestPermissions(Activity,String[],int) location: class ActivityCompat 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. * What went wrong: Execution failed for task ':compileDebugJavaWithJavac'. > 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 Total time: 43.228 secs Error: Error code 1 for command: /home/admin/Desktop/myApp/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/admin/Desktop/myApp/platforms/android/build.gradle,-PcdvBuildArch=x86,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true 

I also looked through the following topics ... but still didn't help

My environment

  • Cordoba-CLI: 6.1.1
  • Android Sdk: 23

So what should I do to solve this problem?

+5
source share
1 answer

I had the same problem after updating my plugins. To save time, I just used an older version of the plugin.

ionic plugin add cordova-plugin-calendar@4.4.4

+4
source

Source: https://habr.com/ru/post/1246546/


All Articles