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

Build failed on Android #480

Open
tomasantunes opened this issue Sep 25, 2022 · 1 comment
Open

Build failed on Android #480

tomasantunes opened this issue Sep 25, 2022 · 1 comment
Labels
android Relates to Android platform awaiting response If no response, issue will be closed build issue An issue related to build process support Support is being requested but not a necessarily a bug

Comments

@tomasantunes
Copy link

When I add the plugin the build fails for Android with the following error:

C:\Users\tomas\Documents\musicshare\platforms\android\app\src\main\java\cordova\plugins\Diagnostic.java:57: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
                             ^
  symbol:   class ActivityCompat
  location: package android.support.v4.app
C:\Users\tomas\Documents\musicshare\platforms\android\app\src\main\java\cordova\plugins\Diagnostic_External_Storage.java:28: error: cannot find symbol
import android.support.v4.os.EnvironmentCompat;
                            ^
  symbol:   class EnvironmentCompat
  location: package android.support.v4.os
C:\Users\tomas\Documents\musicshare\platforms\android\app\src\main\java\cordova\plugins\Diagnostic_Notifications.java:35: error: cannot find symbol
import android.support.v4.app.NotificationManagerCompat;
                             ^
  symbol:   class NotificationManagerCompat
  location: package android.support.v4.app
C:\Users\tomas\Documents\musicshare\platforms\android\app\src\main\java\cordova\plugins\Diagnostic.java:639: error: cannot find symbol
            java.lang.reflect.Method method = ActivityCompat.class.getMethod("shouldShowRequestPermissionRationale", Activity.class, java.lang.String.class);
                                              ^
  symbol:   class ActivityCompat
  location: class cordova.plugins.Diagnostic
C:\Users\tomas\Documents\musicshare\platforms\android\app\src\main\java\cordova\plugins\Diagnostic_External_Storage.java:216: error: cannot find symbol
                    addPath = Environment.MEDIA_MOUNTED.equals(EnvironmentCompat.getStorageState(file));
                                                               ^
  symbol:   variable EnvironmentCompat
  location: class cordova.plugins.Diagnostic_External_Storage
C:\Users\tomas\Documents\musicshare\platforms\android\app\src\main\java\cordova\plugins\Diagnostic_Notifications.java:123: error: cannot find symbol
        NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(this.cordova.getActivity().getApplicationContext());
        ^
  symbol:   class NotificationManagerCompat
  location: class cordova.plugins.Diagnostic_Notifications
C:\Users\tomas\Documents\musicshare\platforms\android\app\src\main\java\cordova\plugins\Diagnostic_Notifications.java:123: error: cannot find symbol
        NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(this.cordova.getActivity().getApplicationContext());
                                                              ^
  symbol:   variable NotificationManagerCompat
  location: class cordova.plugins.Diagnostic_Notifications
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
7 errors
@dpa99c
Copy link
Owner

dpa99c commented Oct 4, 2022

This could be due to a conflict with another plugin.
Please try building the example project which is a known codebase, to validate your build environment.

@dpa99c dpa99c added support Support is being requested but not a necessarily a bug awaiting response If no response, issue will be closed android Relates to Android platform build issue An issue related to build process labels Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Relates to Android platform awaiting response If no response, issue will be closed build issue An issue related to build process support Support is being requested but not a necessarily a bug
Projects
None yet
Development

No branches or pull requests

2 participants