mitchhymel / local_notifications

No longer in development -Flutter plugin for creating notifications
BSD 2-Clause "Simplified" License
108 stars 14 forks source link

Android - build time issues #30

Open achinverma opened 4 years ago

achinverma commented 4 years ago

Hi , i am getting below errors while building the flutter project after adding this lib.

import android.support.v4.app.NotificationCompat; [ ] ^ [ ] symbol: class NotificationCompat [ ] location: package android.support.v4.app [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/factories/NotificationFactory.java:42: error: package NotificationCompat does not exist [ ] private void setVibratePattern(NotificationCompat.Builder builder, NotificationSettings settings) { [ ] ^ [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/factories/NotificationFactory.java:50: error: package NotificationCompat does not exist [ ] private void addActions(NotificationCompat.Builder builder, NotificationSettings settings, [ ] ^ [ +1 ms] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/factories/NotificationFactory.java:60: error: package NotificationCompat does not exist [ ] private void setTicker(NotificationCompat.Builder builder, NotificationSettings settings) { [ ] ^ [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/factories/NotificationFactory.java:65: error: package NotificationCompat does not exist [ ] private void setLargeIcon(NotificationCompat.Builder builder, NotificationSettings settings) { [ ] ^ [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/LocalNotificationsPlugin.java:5: error: cannot find symbol [ ] import android.support.v4.app.NotificationManagerCompat; [ ] ^ [ ] symbol: class NotificationManagerCompat [ ] location: package android.support.v4.app [ +93 ms] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/LocalNotificationsPlugin.java:160: error: cannot find symbol [ ] private NotificationManagerCompat getNotificationManagerCompat() { [ ] ^ [ ] symbol: class NotificationManagerCompat [ ] location: class LocalNotificationsPlugin [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/GenerateLocalNotificationsTask.java:8: error: cannot find symbol [ ] import android.support.v4.app.NotificationManagerCompat; [ ] ^ [ ] symbol: class NotificationManagerCompat [ ] location: package android.support.v4.app [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/GenerateLocalNotificationsTask.java:66: error: cannot find symbol [ ] private NotificationManagerCompat getNotificationCompatManager() { [ ] ^ [ ] symbol: class NotificationManagerCompat [ ] location: class GenerateLocalNotificationsTask [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/factories/NotificationFactory.java:24: error: package NotificationCompat does not exist [ ] NotificationCompat.Builder builder = new NotificationCompat.Builder(context, settings.Channel) [ ] ^ [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/factories/NotificationFactory.java:24: error: package NotificationCompat does not exist [ ] NotificationCompat.Builder builder = new NotificationCompat.Builder(context, settings.Channel) [ ] ^ [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/factories/NotificationFactory.java:54: error: package NotificationCompat does not exist [ ] NotificationCompat.Action action = new NotificationCompat.Action [ ] ^ [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/factories/NotificationFactory.java:55: error: package NotificationCompat.Action does not exist [ ] .Builder(0, extraAction.actionText, intent).build(); [ ] ^ [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/LocalNotificationsPlugin.java:129: error: cannot find symbol [ ] NotificationManagerCompat notificationManager = getNotificationManagerCompat(); [ ] ^ [ +4 ms] symbol: class NotificationManagerCompat [ ] location: class LocalNotificationsPlugin [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/LocalNotificationsPlugin.java:161: error: cannot find symbol [ ] return NotificationManagerCompat.from(getActiveContext()); [ ] ^ [ ] symbol: variable NotificationManagerCompat [ ] location: class LocalNotificationsPlugin [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/GenerateLocalNotificationsTask.java:56: error: cannot find symbol [ ] NotificationManagerCompat notificationManager = getNotificationCompatManager(); [ ] ^ [ ] symbol: class NotificationManagerCompat [ ] location: class GenerateLocalNotificationsTask [ ] /home/signity/.pub-cache/hosted/pub.dartlang.org/local_notifications-0.0.7/android/src/main/java/com/mythichelm/localnotifications/GenerateLocalNotificationsTask.java:67: error: cannot find symbol [ ] return NotificationManagerCompat.from(this.mContext.get()); [ ] ^ [ ] symbol: variable NotificationManagerCompat [ ] location: class GenerateLocalNotificationsTask [ ] 17 errors [ +89 ms] FAILURE: Build failed with an exception. [ ] * What went wrong: [ ] Execution failed for task ':local_notifications: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. Run with --scan to get full insights. [ ] * Get more help at https://help.gradle.org [ ] BUILD FAILED in 1m 8s [{"event":"app.progress","params":{"appId":"620c3a74-3727-41ea-a6ac-98dca5654549","id":"2","progressId":null,"finished":true}}] [ +444 ms] ******************************************************************************************* [ ] The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. [ ] See https://goo.gl/CP92wY for more information on the problem and how to fix it. [ ] *******************************************************************************************