This is my Error;
This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
The following AndroidX dependencies are detected:
androidx.fragment:fragment:1.0.0,
androidx.versionedparcelable:versionedparcelable:1.0.0,
androidx.slidingpanelayout:slidingpanelayout:1.0.0
...
How can i solve this problem? i delete all androidx libraries from my gradle files and my imported libraries from classes. i dont want to use androidx.
The easiest way to do it in a Cordova project is to open your config.xml file and add the following inside the <platform name="android"> tag.
<preference name="AndroidXEnabled" value="true" />
That way, if you ever remove and re-add the Android platform, you won't have to go back into the gradle.properties and manually edit it. (Besides, my gradle.properties seems to be overwritten every time I type "cordova build android" so editing it directly doesn't work for me anyway.)
Best of luck.
first Open your Project gradle scripts>> then open gradle.properties And Finally paste this two line code
android.useAndroidX=true
android.enableJetifier=true
cordova plugin add cordova-plugin-androidx
cordova plugin add cordova-plugin-androidx-adapter
Then build your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With