我在使用music-controls插件构建android Cordova时遇到此错误。 我也有androidx和androidx-adapter插件 我能做什么?
ionic cordova build android
BUILD FAILED in 6s
/platforms/android/gradlew: Command failed with exit code 1 Error output:
/platforms/android/app/src/main/java/com/homerours/musiccontrols/MusicControls.java:15: error: package android.support.v4.media does not exist
import android.support.v4.media.MediaMetadataCompat;
-
ionic info
离子:
ionic(Ionic CLI):4.12.0(/ usr / local / lib / node_modules / ionic) 离子框架:离子角3.9.8 @ ionic / app-scripts:3.2.4
科尔多瓦:
cordova(Cordova CLI):9.0.0(cordova-lib@9.0.1) Cordova平台:Android 8.0.0 Cordova插件:没有列入白名单的插件(总共25个插件)
系统:
Android SDK工具:26.1.1 ios部署:1.9.4 ios-sim:8.0.1 NodeJS:v10.15.3(/ usr / local / bin / node) npm:6.9.0 操作系统:macOS Mojave Xcode:Xcode 10.2.1 Build版本10E1001
-
cordova plugins list
cordova-android-play-services-gradle-release 4.0.0 “cordova-android-play-services-gradle-release”
cordova-plugin-add-swift-support 2.0.2 “AddSwiftSupport”
cordova-plugin-advanced-http 1.11.1 “Advanced HTTP plugin”
cordova-plugin-androidx 1.0.2 “cordova-plugin-androidx”
cordova-plugin-androidx-adapter 1.1.0 “cordova-plugin-androidx-adapter”
cordova-plugin-app-version 0.1.9 “AppVersion”
cordova-plugin-appminimize 1.0.1 “AppMinimize”
cordova-plugin-apprate 1.4.0 “AppRate”
cordova-plugin-background-mode 0.7.2 “BackgroundMode”
cordova-plugin-datepicker 0.9.3 “DatePicker”
cordova-plugin-device 2.0.3 “Device”
cordova-plugin-dialogs 2.0.2 “Notification”
cordova-plugin-file 6.0.2 “File”
cordova-plugin-firebasex 4.0.0 “Google Firebase Plugin”
cordova-plugin-globalization 1.11.0 “Globalization”
cordova-plugin-google-analytics 1.8.6 “Google Universal Analytics Plugin”
cordova-plugin-inappbrowser 2.0.2 “InAppBrowser”
cordova-plugin-media 5.0.3 “Media”
cordova-plugin-music-controls 2.2.0 “MusicControls”
cordova-plugin-nativestorage 2.3.2 “NativeStorage”
cordova-plugin-screen-orientation 3.0.2 “Screen Orientation”
cordova-plugin-splashscreen 5.0.3 “Splashscreen”
cordova-plugin-statusbar 2.4.3 “StatusBar”
cordova-plugin-whitelist 1.3.4 “Whitelist”
cordova-sqlite-storage 3.2.1 “Cordova sqlite storage plugin - cordova-sqlite-storage plugin version”
cordova-support-google-services 1.3.1 “cordova-support-google-services”
es6-promise-plugin 4.2.2 “Promise”
ionic-plugin-keyboard 2.2.1 “Keyboard”