Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Built failed #36

Open
Aficionado45 opened this issue Jul 13, 2022 · 13 comments
Open

Android Built failed #36

Aficionado45 opened this issue Jul 13, 2022 · 13 comments
Assignees

Comments

@Aficionado45
Copy link

PS E:\repo-sync\hello_world> cordova run android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: C:\Users\afici\AppData\Local\Android\sdk
Subproject Path: CordovaLib
Subproject Path: app

Configure project :app
WARNING:: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 7.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01

Task :app:compileDebugJavaWithJavac FAILED
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:33: error: cannot find symbol
import android.support.v4.app.NotificationCompat;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:34: error: package android.support.v4.util does not exist
import android.support.v4.util.ArraySet;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:35: error: package android.support.v4.util does not exist
import android.support.v4.util.Pair;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:52: error: cannot find symbol
import static android.support.v4.app.NotificationManagerCompat.IMPORTANCE_MAX;
^
symbol: class NotificationManagerCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:52: error: static import only from classes and interfaces
import static android.support.v4.app.NotificationManagerCompat.IMPORTANCE_MAX;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:53: error: cannot find symbol
import static android.support.v4.app.NotificationManagerCompat.IMPORTANCE_MIN;
^
symbol: class NotificationManagerCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:53: error: static import only from classes and interfaces
import static android.support.v4.app.NotificationManagerCompat.IMPORTANCE_MIN;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:28: error: cannot find symbol
import android.support.v4.app.NotificationCompat;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:29: error: package android.support.v4.app.NotificationCompat.MessagingStyle does not exist
import android.support.v4.app.NotificationCompat.MessagingStyle.Message;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:44: error: cannot find symbol
import static android.support.v4.app.NotificationCompat.DEFAULT_LIGHTS;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:44: error: static import only from classes
and interfaces
import static android.support.v4.app.NotificationCompat.DEFAULT_LIGHTS;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:45: error: cannot find symbol
import static android.support.v4.app.NotificationCompat.DEFAULT_SOUND;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:45: error: static import only from classes
and interfaces
import static android.support.v4.app.NotificationCompat.DEFAULT_SOUND;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:46: error: cannot find symbol
import static android.support.v4.app.NotificationCompat.DEFAULT_VIBRATE;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:46: error: static import only from classes
and interfaces
import static android.support.v4.app.NotificationCompat.DEFAULT_VIBRATE;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:47: error: cannot find symbol
import static android.support.v4.app.NotificationCompat.PRIORITY_MAX;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:47: error: static import only from classes
and interfaces
import static android.support.v4.app.NotificationCompat.PRIORITY_MAX;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:48: error: cannot find symbol
import static android.support.v4.app.NotificationCompat.PRIORITY_MIN;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:48: error: static import only from classes
and interfaces
import static android.support.v4.app.NotificationCompat.PRIORITY_MIN;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:49: error: cannot find symbol
import static android.support.v4.app.NotificationCompat.VISIBILITY_PUBLIC;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:49: error: static import only from classes
and interfaces
import static android.support.v4.app.NotificationCompat.VISIBILITY_PUBLIC;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:50: error: cannot find symbol
import static android.support.v4.app.NotificationCompat.VISIBILITY_SECRET;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:50: error: static import only from classes
and interfaces
import static android.support.v4.app.NotificationCompat.VISIBILITY_SECRET;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:79: error: package NotificationCompat
does not exist
private static SparseArray<NotificationCompat.Builder> cache = null;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:88: error: package NotificationCompat
does not exist
private final NotificationCompat.Builder builder;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:97: error: package NotificationCompat
does not exist
Notification (Context context, Options options, NotificationCompat.Builder builder) {
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:446: error: package NotificationCompat does not exist
static NotificationCompat.Builder getCachedBuilder (int key) {
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\action\Action.java:25: error: cannot find symbol
import android.support.v4.app.RemoteInput;
^
symbol: class RemoteInput
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:606: error: cannot find symbol
Message[] getMessages() {
^
symbol: class Message
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\action\Action.java:111: error: cannot find symbol
public RemoteInput getInput() {
^
symbol: class RemoteInput
location: class de.appplant.cordova.plugin.notification.action.Action
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\localnotification\ClickReceiver.java:25: error: cannot find symbol
import android.support.v4.app.RemoteInput;
^
symbol: class RemoteInput
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Manager.java:30: error: cannot find symbol
import android.support.v4.app.NotificationManagerCompat;
^
symbol: class NotificationManagerCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Manager.java:44: error: cannot find symbol
import static android.support.v4.app.NotificationManagerCompat.IMPORTANCE_DEFAULT;
^
symbol: class NotificationManagerCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Manager.java:44: error: static import only from classes
and interfaces
import static android.support.v4.app.NotificationManagerCompat.IMPORTANCE_DEFAULT;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Manager.java:413: error: cannot find symbol
private NotificationManagerCompat getNotCompMgr() {
^
symbol: class NotificationManagerCompat
location: class de.appplant.cordova.plugin.notification.Manager
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:30: error: cannot find symbol
import android.support.v4.app.NotificationCompat;
^
symbol: class NotificationCompat
location: package android.support.v4.app
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:31: error: package android.support.v4.app.NotificationCompat.MessagingStyle does not exist
import android.support.v4.app.NotificationCompat.MessagingStyle.Message;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:177: error: package NotificationCompat does not exist
private void applyStyle(NotificationCompat.Builder builder) {
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:219: error: package NotificationCompat does not exist
private void applyMessagingStyle(NotificationCompat.Builder builder,
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:220: error: cannot find symbol
Message[] messages) {
^
symbol: class Message
location: class de.appplant.cordova.plugin.notification.Builder
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:240: error: package NotificationCompat does not exist
private void applyBigPictureStyle(NotificationCompat.Builder builder,
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:259: error: package NotificationCompat does not exist
private void applyInboxStyle(NotificationCompat.Builder builder) {
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:278: error: package NotificationCompat does not exist
private void applyBigTextStyle(NotificationCompat.Builder builder) {
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:294: error: package NotificationCompat does not exist
private void applyMediaStyle(NotificationCompat.Builder builder,
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:311: error: package NotificationCompat does not exist
private void applyDeleteReceiver(NotificationCompat.Builder builder) {
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:335: error: package NotificationCompat does not exist
private void applyContentReceiver(NotificationCompat.Builder builder) {
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:360: error: package NotificationCompat does not exist
private void applyActions (NotificationCompat.Builder builder) {
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:412: error: package NotificationCompat does not exist
private NotificationCompat.Builder findOrCreateBuilder() {
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\util\AssetProvider.java:22: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\util\AssetProvider.java:24: error: cannot find symbol
public class AssetProvider extends FileProvider {
^
symbol: class FileProvider
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:167: error: cannot find symbol
List<Pair<Date, Intent>> intents = new ArrayList<Pair<Date, Intent>>();
^
symbol: class Pair
location: class de.appplant.cordova.plugin.notification.Notification
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:167: error: cannot find symbol
List<Pair<Date, Intent>> intents = new ArrayList<Pair<Date, Intent>>();
^
symbol: class Pair
location: class de.appplant.cordova.plugin.notification.Notification
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:168: error: cannot find symbol
Set ids = new ArraySet();
^
symbol: class ArraySet
location: class de.appplant.cordova.plugin.notification.Notification
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:185: error: cannot find symbol
intents.add(new Pair<Date, Intent>(date, intent));
^
symbol: class Pair
location: class de.appplant.cordova.plugin.notification.Notification
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:201: error: cannot find symbol
for (Pair<Date, Intent> pair : intents) {
^
symbol: class Pair
location: class de.appplant.cordova.plugin.notification.Notification
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:214: error: cannot find symbol
case IMPORTANCE_MIN:
^
symbol: variable IMPORTANCE_MIN
location: class de.appplant.cordova.plugin.notification.Notification
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:217: error: cannot find symbol
case IMPORTANCE_MAX:
^
symbol: variable IMPORTANCE_MAX
location: class de.appplant.cordova.plugin.notification.Notification
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Notification.java:433: error: package NotificationCompat does not exist
cache = new SparseArray<NotificationCompat.Builder>();
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:311: error: cannot find symbol
return NotificationCompat.COLOR_DEFAULT;
^
symbol: variable NotificationCompat
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:332: error: cannot find symbol
return NotificationCompat.COLOR_DEFAULT;
^
symbol: variable NotificationCompat
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:437: error: cannot find symbol
defaults |= DEFAULT_VIBRATE;
^
symbol: variable DEFAULT_VIBRATE
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:439: error: cannot find symbol
defaults &= DEFAULT_VIBRATE;
^
symbol: variable DEFAULT_VIBRATE
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:443: error: cannot find symbol
defaults |= DEFAULT_SOUND;
^
symbol: variable DEFAULT_SOUND
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:446: error: cannot find symbol
defaults &= DEFAULT_SOUND;
^
symbol: variable DEFAULT_SOUND
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:450: error: cannot find symbol
defaults |= DEFAULT_LIGHTS;
^
symbol: variable DEFAULT_LIGHTS
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:453: error: cannot find symbol
defaults &= DEFAULT_LIGHTS;
^
symbol: variable DEFAULT_LIGHTS
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:466: error: cannot find symbol
return VISIBILITY_PUBLIC;
^
symbol: variable VISIBILITY_PUBLIC
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:468: error: cannot find symbol
return VISIBILITY_SECRET;
^
symbol: variable VISIBILITY_SECRET
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:478: error: cannot find symbol
return Math.min(Math.max(prio, PRIORITY_MIN), PRIORITY_MAX);
^
symbol: variable PRIORITY_MIN
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:478: error: cannot find symbol
return Math.min(Math.max(prio, PRIORITY_MIN), PRIORITY_MAX);
^
symbol: variable PRIORITY_MAX
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:617: error: cannot find symbol
Message[] messages = new Message[list.length()];
^
symbol: class Message
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:617: error: cannot find symbol
Message[] messages = new Message[list.length()];
^
symbol: class Message
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Options.java:626: error: cannot find symbol
messages[i] = new Message(message, timestamp, person);
^
symbol: class Message
location: class de.appplant.cordova.plugin.notification.Options
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\util\AssetUtil.java:365: error: cannot find symbol
return AssetProvider.getUriForFile(context, authority, file);
^
symbol: method getUriForFile(android.content.Context,java.lang.String,java.io.File)
location: class de.appplant.cordova.plugin.notification.util.AssetProvider
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\action\Action.java:112: error: package RemoteInput does
not exist
return new RemoteInput.Builder(getId())
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\localnotification\ClickReceiver.java:76: error: cannot find symbol
Bundle input = RemoteInput.getResultsFromIntent(getIntent());
^
symbol: variable RemoteInput
location: class de.appplant.cordova.plugin.localnotification.ClickReceiver
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Manager.java:121: error: cannot find symbol
CHANNEL_ID, CHANNEL_NAME, IMPORTANCE_DEFAULT);
^
symbol: variable IMPORTANCE_DEFAULT
location: class de.appplant.cordova.plugin.notification.Manager
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Manager.java:414: error: cannot find symbol
return NotificationManagerCompat.from(context);
^
symbol: variable NotificationManagerCompat
location: class de.appplant.cordova.plugin.notification.Manager
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:114: error: package NotificationCompat does not exist
NotificationCompat.Builder builder;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:178: error: cannot find symbol
Message[] messages = options.getMessages();
^
symbol: class Message
location: class de.appplant.cordova.plugin.notification.Builder
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:222: error: package NotificationCompat does not exist
NotificationCompat.MessagingStyle style;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:224: error: package NotificationCompat does not exist
style = new NotificationCompat.MessagingStyle("Me")
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:227: error: cannot find symbol
for (Message msg : messages) {
^
symbol: class Message
location: class de.appplant.cordova.plugin.notification.Builder
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:243: error: package NotificationCompat does not exist
NotificationCompat.BigPictureStyle style;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:247: error: package NotificationCompat does not exist
style = new NotificationCompat.BigPictureStyle(builder)
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:260: error: package NotificationCompat does not exist
NotificationCompat.InboxStyle style;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:263: error: package NotificationCompat does not exist
style = new NotificationCompat.InboxStyle(builder)
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:279: error: package NotificationCompat does not exist
NotificationCompat.BigTextStyle style;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:281: error: package NotificationCompat does not exist
style = new NotificationCompat.BigTextStyle(builder)
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:296: error: cannot find symbol
MediaStyle style;
^
symbol: class MediaStyle
location: class de.appplant.cordova.plugin.notification.Builder
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:298: error: cannot find symbol
style = new MediaStyle(builder)
^
symbol: class MediaStyle
location: class de.appplant.cordova.plugin.notification.Builder
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:362: error: package NotificationCompat.Action does not exist
NotificationCompat.Action.Builder btn;
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:368: error: package NotificationCompat.Action does not exist
btn = new NotificationCompat.Action.Builder(
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:414: error: package NotificationCompat does not exist
NotificationCompat.Builder builder = Notification.getCachedBuilder(key);
^
E:\repo-sync\hello_world\platforms\android\app\src\main\java\de\appplant\cordova\plugin\notification\Builder.java:417: error: package NotificationCompat does not exist
builder = new NotificationCompat.Builder(context, options.getChannel());
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
96 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app: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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s
25 actionable tasks: 1 executed, 24 up-to-date
Command failed with exit code 1: E:\repo-sync\hello_world\platforms\android\gradlew cdvBuildDebug -b E:\repo-sync\hello_world\platforms\android\build.gradle

@orchuban
Copy link
Collaborator

Is android error.
try to create cordova app standalone
or Android app and you will get same error.
Look on stackoverflow.com for this error

@Aficionado45
Copy link
Author

No actually that's not the case, I'm able to build standalone cordova or anyother android app

@Aficionado45
Copy link
Author

This is for cordova standalone everything is working fine.

BUILD SUCCESSFUL in 5s
48 actionable tasks: 48 executed
Built the following apk(s):
E:\repo-sync\cordova\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Users\afici\AppData\Local\Android\sdk (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: C:\Users\afici\AppData\Local\Android\sdk
Deploying to device 3448d03d
Using apk: E:\repo-sync\cordova\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Package name: com.example.hello
INSTALL SUCCESS
LAUNCH SUCCESS

@orchuban orchuban reopened this Jul 13, 2022
@orchuban
Copy link
Collaborator

This is for cordova standalone everything is working fine.

BUILD SUCCESSFUL in 5s 48 actionable tasks: 48 executed Built the following apk(s): E:\repo-sync\cordova\platforms\android\app\build\outputs\apk\debug\app-debug.apk Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=C:\Users\afici\AppData\Local\Android\sdk (recommended setting) ANDROID_HOME=undefined (DEPRECATED) Using Android SDK: C:\Users\afici\AppData\Local\Android\sdk Deploying to device 3448d03d Using apk: E:\repo-sync\cordova\platforms\android\app\build\outputs\apk\debug\app-debug.apk Package name: com.example.hello INSTALL SUCCESS LAUNCH SUCCESS

That you can try to init new project with reco again. I think now it's will work

@Aficionado45
Copy link
Author

Still getting same errors in new projects, npm start works fine but npm run build and cordova run android gives error.

@Aficionado45
Copy link
Author

I resolved those android issues, navigation plugin was causing all of that so I removed it. But now npm start is working fine on browser but showing blank screen on android.

@Aficionado45
Copy link
Author

Already tried everything mentioned in Issue#13, it isn't resolved.

@bslikkerveer
Copy link

I just went through the same, I also just removed the notification plugin. The blank screen is because 'deviceready' never fires because the cordova.js can't be loaded because cordova or reco isn't listening/serving anything on port 8597.

I circumvented this by altering 'node_modules\cordova_script\dist\index.js' to always use the PUBLIC_URL and never ':8597/browser/www'. I just copy 'platforms\android\platform_www' to 'public' to make the necessary cordova.js and plugin js files available.

Just my 2 ct.

@orchuban
Copy link
Collaborator

orchuban commented Aug 4, 2022

I just went through the same, I also just removed the notification plugin. The blank screen is because 'deviceready' never fires because the cordova.js can't be loaded because cordova or reco isn't listening/serving anything on port 8597.

I circumvented this by altering 'node_modules\cordova_script\dist\index.js' to always use the PUBLIC_URL and never ':8597/browser/www'. I just copy 'platforms\android\platform_www' to 'public' to make the necessary cordova.js and plugin js files available.

Just my 2 ct.

Great, Thanks, do you want access to the edit the code and help this project?

@bslikkerveer
Copy link

Hi Or,

I might, though honestly, time is very scarce.

I see that current plain Cordova just copies cordova.js etc. to the platform www, as does your current react.cordova implementation.

So it seems that actually the only thing that's needed is to just not use 'cordova_script' and add <script src="cordova.js"></script> to the public\index.html head in your template (as Cordova does). Works for me (on the browser and android platforms).

@bslikkerveer
Copy link

Ah, one addition; npm run reactstart still requires the cordova.js scripts and fails without.

@bslikkerveer
Copy link

Sorry for the intermittent updates; I see 'reco serve' does call bundleServe and therefore serves the current cordova.js, etc. on 8597 just fine and should therefore work with cordova_script. npm run reactstart can then be fixed by changing package.json reactstart to "reco serve", since that also provides live reloads. A Fast Refresh option would also be nice. ; )

Wouldn't a copy_dir (ie. from browser platform to public) in serve.js instead of 'cordova serve' be simpler, removing the need for cordova_script? Not super-elegant I guess. Just trying to help and I may very well be cutting corners here though.

@orchuban
Copy link
Collaborator

orchuban commented Aug 7, 2022

You're right.
The reason for ;cordove_script; is that during the dev(serve time) you have to add the cordova script to react's serve. In compile it works differently. If you don't use it, react will run without cordova in development mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants