简体   繁体   English

ionic build 使用旧的支持库生成 android 应用程序

[英]ionic build generate android app with old support library

I am building ionic app, when I run ionic cordova add android the android app is created successfully but when open it to build in using android studio I got errors in some activities that android.support.v4 not found and it is solved when changing it to androidx , where should I change this settings from ionic application itself to avoid build issues in android studio?我正在构建离子应用程序,当我运行ionic cordova add android android 应用程序已成功创建但是当打开它以使用 android studio 进行构建时我在某些活动中遇到错误android.support.v4未找到并在更改时解决到androidx ,我应该在哪里更改离子应用程序本身的设置以避免 android 工作室中的构建问题?

as explained in docs , you need to wait for the plugin developers to fix it and in the meantime a workaround is to patch the plugin with jetifier:文档中所述,您需要等待插件开发人员修复它,同时解决方法是使用 jetifier 修补插件:

npm install jetifier
npx jetify
npx cap sync android

If you want to change the plugin, you have a create a new custom plugin and copy their code into it and change it there, which is usually harder.如果你想更改插件,你必须创建一个新的自定义插件并将他们的代码复制到其中并在那里进行更改,这通常更难。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM