In ionic 3 the local notifications have some 6 major issues in android/plugin/de/notification .
app can not be build.
What are those?
Why? What error message are you getting?
What is your ionic info
output?
:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
^
symbol: class NotificationChannel
location: package android.app
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
symbol: static O
location: class
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:109: error: cannot find symbol
if (SDK_INT < O)
^
symbol: variable O
location: class Manager
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:112: error: cannot find symbol
NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
^
symbol: class NotificationChannel
location: class Manager
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:112: error: cannot find symbol
NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
^
symbol: method getNotificationChannel(String)
location: variable mgr of type NotificationManager
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:117: error: cannot find symbol
channel = new NotificationChannel(
^
symbol: class NotificationChannel
location: class Manager
Note: Some input files use or override a deprecated API.
:compileDebugJavaWithJavac FAILED
Note: Recompile with -Xlint:deprecation for details.
6 errors
BUILD FAILED
Total time: 33.709 secs
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.
Error: cmd: Command failed with exit code 1 Error output:
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
^
symbol: class NotificationChannel
location: package android.app
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
symbol: static O
location: class
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:109: error: cannot find symbol
if (SDK_INT < O)
^
symbol: variable O
location: class Manager
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:112: error: cannot find symbol
NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
^
symbol: class NotificationChannel
location: class Manager
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:112: error: cannot find symbol
NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
^
symbol: method getNotificationChannel(String)
location: variable mgr of type NotificationManager
G:\ionic\dexterio\platforms\android\src\de\appplant\cordova\plugin\notification\Manager.java:117: error: cannot find symbol
channel = new NotificationChannel(
^
symbol: class NotificationChannel
location: class Manager
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors
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.
[ERROR] An error occurred while running cordova build android (exit code 1)
This is the error that i am getting .
-> I have just created a new project.
-> installed the Local Notification plugin from the native framework docs.
-> did’nt make any changes in code and just tried to build the app and got the error above.
Ionic info is:
cli packages: (C:\Users\hp\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 3.1.6
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.9.2
System:
Node : v6.11.0
npm : 3.10.10
OS : Windows 10
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : legacy