I'm developing the cordova application, in which I want to have some kind of booking functionality through calendar. So for that, I installed very famous EddyVerbruggen/Calendar-PhoneGap-Plugin plugin.
But while building the project, it's throwing 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 gone through following threads..but still no help
My Environment
So, what should I do to resolve this issue?
I had the same problem after updating my plugins. To save time, I just used an older version of the plugin.
ionic plugin add [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With