新版本已经不能像原来的方式一样导包,因为支持了安卓10的特性,所以包不再需要导入,可以直接通过布局design界面直接选择相应的包,然后可以直接使用

关于新版本Android Studio导包问题

下面以CarView为例,直接打出CarView即可自动生成以下代码

<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" 
    android:layout_height="match_parent">

    </androidx.cardview.widget.CardView>

 

 

 

相关文章:

  • 2021-08-26
  • 2021-09-04
  • 2021-06-12
  • 2022-12-23
  • 2021-05-09
  • 2021-08-19
  • 2021-11-23
  • 2021-10-21
猜你喜欢
  • 2022-01-14
  • 2021-12-24
  • 2021-12-21
  • 2021-10-09
  • 2022-01-22
  • 2021-09-01
  • 2021-07-29
相关资源
相似解决方案