Home > Back-end >  Error while compiling after i installed @capacitor/local-notifications plugin
Error while compiling after i installed @capacitor/local-notifications plugin

Time:08-24

i am new to ionic, so I tried to install local notification dependency using

npm install @capacitor/local-notifications

but when i tried to run the ionic aplication in emulator android studio, i got this error

Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.

i dont undestand what happen. if i uninstall the @capacitor/local-notifications dependency, it will run just fine.

here's some of image that might be related to these problem

"@capacitor/core": "^3.3.4",
"@capacitor/local-notifications": "^4.0.1",

here's my variables.gradel, i have changed the targetSDKVersion from 30 to 31, because of some google konsol requirements.

i dont even know what is wrong with the dependency, but if i can guess it is just not compatible version for my app.. please help me to solve this guys... thank you...

ext {
    minSdkVersion = 21
    compileSdkVersion = 30
    targetSdkVersion = 31
    androidxActivityVersion = '1.2.0'
    androidxAppCompatVersion = '1.2.0'
    androidxCoordinatorLayoutVersion = '1.1.0'
    androidxCoreVersion = '1.3.2'
    androidxFragmentVersion = '1.3.0'
    junitVersion = '4.13.1'
    androidxJunitVersion = '1.1.2'
    androidxEspressoCoreVersion = '3.3.0'
    cordovaAndroidVersion = '7.0.0'
}

CodePudding user response:

Please install Capacitor Local Notification plugin version 1.1.0. This version ist for Capacitor 3 which you are using.

  • Related