2021年3月15日 星期一

ionic cordova 改為 AndroidX

修改    \platforms\android\gradle.properties


android.useAndroidX=true
android.enableJetifier=true


Build:

    ionic cordova build android


錯誤訊息:

該項目使用AndroidX依賴項,但未啟用'android.useAndroidX'屬性。在gradle.properties文件中將此屬性設置為true,然後重試。

檢測到以下AndroidX依賴項:

...


解決:

# add plugin to enable AndroidX in the project

cordova plugin add cordova-plugin-androidx


# add plugin to patch existing plugin source that uses the Android Support Library to use AndroidX

cordova plugin add cordova-plugin-androidx-adapter


沒有留言:

張貼留言

[Q&A] Send image from ionic to asp.net core (IFormFile) web api

 [Q] We are looking to upload image from ionic to .net core web api. To achieve this we are using file transfer plugin. So, far we understoo...