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

Can't build app with this plugin #132

Open
IgorRyaboff opened this issue Jul 8, 2018 · 2 comments
Open

Can't build app with this plugin #132

IgorRyaboff opened this issue Jul 8, 2018 · 2 comments

Comments

@IgorRyaboff
Copy link

IgorRyaboff commented Jul 8, 2018

I was trying to build the app with this plugin, but i get this:

`1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:28: error: cannot find symbol
1>MSBUILD : cordova-build error : import android.app.NotificationChannel;
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: class NotificationChannel
1>MSBUILD : cordova-build error : location: package android.app
1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:54: error: cannot find symbol
1>MSBUILD : cordova-build error : int importance = NotificationManager.IMPORTANCE_LOW;
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: variable IMPORTANCE_LOW
1>MSBUILD : cordova-build error : location: class NotificationManager
1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:56: error: cannot find symbol
1>MSBUILD : cordova-build error : NotificationChannel mChannel = new NotificationChannel(this.CHANNEL_ID, name,importance);
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: class NotificationChannel
1>MSBUILD : cordova-build error : location: class MusicControlsNotification
1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:56: error: cannot find symbol
1>MSBUILD : cordova-build error : NotificationChannel mChannel = new NotificationChannel(this.CHANNEL_ID, name,importance);
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: class NotificationChannel
1>MSBUILD : cordova-build error : location: class MusicControlsNotification
1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:156: error: cannot find symbol
1>MSBUILD : cordova-build error : builder.setChannelId(this.CHANNEL_ID);
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: method setChannelId(String)
1>MSBUILD : cordova-build error : location: variable builder of type Builder
1>MSBUILD : cordova-build error : 5 errors
1>MSBUILD : cordova-build error : FAILURE: Build failed with an exception.
1>MSBUILD : cordova-build error : * What went wrong:
1>MSBUILD : cordova-build error : Execution failed for task ':compileDebugJavaWithJavac'.
1>MSBUILD : cordova-build error : > Compilation failed; see the compiler error output for details.
1>MSBUILD : cordova-build error : * Try:
1>MSBUILD : cordova-build error : Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Command finished with error code 1: cmd /s /c "D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\gradlew.bat cdvBuildDebug -b D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
1>MSBUILD : cordova-build error : Error: cmd: Command failed with exit code 1 Error output:
MSBUILD : cordova-build warning : Note: Some input files use or override a deprecated API.
MSBUILD : cordova-build warning : Note: Recompile with -Xlint:deprecation for details.

1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:28: error: cannot find symbol
1>MSBUILD : cordova-build error : import android.app.NotificationChannel;
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: class NotificationChannel
1>MSBUILD : cordova-build error : location: package android.app
1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:54: error: cannot find symbol
1>MSBUILD : cordova-build error : int importance = NotificationManager.IMPORTANCE_LOW;
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: variable IMPORTANCE_LOW
1>MSBUILD : cordova-build error : location: class NotificationManager
1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:56: error: cannot find symbol
1>MSBUILD : cordova-build error : NotificationChannel mChannel = new NotificationChannel(this.CHANNEL_ID, name,importance);
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: class NotificationChannel
1>MSBUILD : cordova-build error : location: class MusicControlsNotification
1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:56: error: cannot find symbol
1>MSBUILD : cordova-build error : NotificationChannel mChannel = new NotificationChannel(this.CHANNEL_ID, name,importance);
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: class NotificationChannel
1>MSBUILD : cordova-build error : location: class MusicControlsNotification
1>MSBUILD : cordova-build error : D:\MyDocs\ProtonMusic\ProtonMusic\platforms\android\src\com\homerours\musiccontrols\MusicControlsNotification.java:156: error: cannot find symbol
1>MSBUILD : cordova-build error : builder.setChannelId(this.CHANNEL_ID);
1>MSBUILD : cordova-build error : ^
1>MSBUILD : cordova-build error : symbol: method setChannelId(String)
1>MSBUILD : cordova-build error : location: variable builder of type Builder
1>MSBUILD : cordova-build error : 5 errors
1>MSBUILD : cordova-build error : FAILURE: Build failed with an exception.
1>MSBUILD : cordova-build error : * What went wrong:
1>MSBUILD : cordova-build error : Execution failed for task ':compileDebugJavaWithJavac'.
1>MSBUILD : cordova-build error : > Compilation failed; see the compiler error output for details.
1>MSBUILD : cordova-build error : * Try:
1>MSBUILD : cordova-build error : Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
1>MSBUILD : cordova-build error : Picked up _JAVA_OPTIONS: -Xmx512M`

What can I do?

@aman-gojariya
Copy link

First one remove this plugin with below command
ionic cordova plugin rm cordova-plugin-music-controls

then after add this plugin with this command
ionic cordova plugin add https://github.com/amitkhare/cordova-music-controls-plugin --save

after you do that, remove the "git+" that gets added to the config.xml and package.json files

I think it's works.

@tbergeron
Copy link

tbergeron commented Feb 28, 2019

@amanpatel1449 WHY does everybody refers to this 3 years old repo when NPM points to this one; which is the most up-to-date?! I see this everywhere, it fixes NOTHING and is just a waste of time. Please EXPLAIN when telling people to simply swap sources. It's borderline a security concern...

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

3 participants