Open Dzivo opened 5 years ago
Same error for version 2.2.0,
try remove this plugin
ionic cordova plugin rm cordova-plugin-music-controls add this plugin
ionic cordova plugin add https://github.com/amitkhare/cordova-music-controls-plugin --save
Or try adding the gradle release plugin. It works to resolve conflicting support library versions between different plugins at build time.
I have the same problem. It is working with the old version of cordova-music-controls-plugin
https://github.com/amitkhare/cordova-music-controls-plugin
But it doesn't work with the current cordova-music-controls-plugin, showing a lot of errors like this when I compile with this version of MusicControls:
error: package android.support.v4.media does not exist import android.support.v4.media.MediaMetadataCompat;
@paulovargatt I've seen this repo everywhere, since 2017. Please explain WHY we should use it. WHY should we switch from this up-to-date repo here to this old fork? WHY should this fix our issue?
Every time I tested this repo, I had random errors like:
Error: Cannot find plugin.xml for plugin "ionic-audio". Please try adding it again.
Please instead of repeating what you read on a random board/issue, explain why and how this should resolve our issue. Beware of just telling everybody to use any fork: it may contain altered code and cause security issues.
There's a reason THIS repo isn't working at the moment, why couldn't we simply debug this one???
@DanielTizon to resolve the Android v4 issues, install this plugin here cordova-plugin-android-support-v4
it fixed them for me. Also make sure your Android Studio/SDK/whatever are all up-to-date. Sometimes I noticed if my libraries were old it caused issues with my builds. Hope it helps!
@Dzivo advice here ^^ applies to OP too
@tbergeron I recommended the plugin in question because it was the only one that solved my problem of build in both platforms, for the updated version "homerours" I and many other users receive several errors at the time of the build without recommendations on how to solve ...
Many thanks @tbergeron. That indeed solves the plugin addition problems. For others: note that at the moment the npm registry does not refer to "cordova-music-controls-plugin", so you have to add the plugin via "ionic cordova plugin add https://github.com/homerours/cordova-music-controls-plugin.git"
I had luck adding this plugin cordova plugin add cordova-plugin-android-support-v4-jar
If in the past you have tried to solve this with the non -jar
version. It may not have worked. Which was exactly my issue
This is still an issue. None of the above fixes worked. I've tried with a fresh empty project and still doesn't work
I have the same problem trying to upgrade to ionic 4
Adding this to my project.properties file, solved the problem for me in Ionic 3
cordova.system.library.1=com.android.support:support-annotations:27.+ cordova.system.library.2=com.android.support:support-media-compat:27.+
thanks @javier-gm !! it works with Ionic3 + Cordova-Android8 (sdk28) too:
cordova.system.library.1=com.android.support:support-annotations:28.+ cordova.system.library.2=com.android.support:support-media-compat:28.+
I have the same problem. It is working with the old version of cordova-music-controls-plugin
https://github.com/amitkhare/cordova-music-controls-plugin
But it doesn't work with the current cordova-music-controls-plugin, showing a lot of errors like this when I compile with this version of MusicControls:
error: package android.support.v4.media does not exist import android.support.v4.media.MediaMetadataCompat;
HI, I got the same issue, so I made a fork and fixed the plugin that works for both IOS 13 and android 10 tested. you can use my plugin
cordova plugin add https://github.com/Ekaanth/cordova-music-controls-plugin
thank you.
In Ionic 4 this plugin breaks build with message:
package.json
config.xml