zoukankan      html  css  js  c++  java
  • [android]com.android.support:appcompat-v7:XXX 包导入无法Build

    在学习《Android编程权威指南》时,按书中要求添加com.android.support:appcompat的依赖,然后编译不通过,提示如下问题:

    大概意思是,Android Pie之前支持这个库,我们建议迁移到AndroidX libraries……

    然后搜索了一下,原来2018年google开发者大会以后,相关库已经整合到AndroidX库中,这里放一个链接:(别人的说明)

    1. AndroidX变化

    1)常用依赖库对比:

    Old build artifactAndroidX build artifact
    com.android.support:appcompat-v7:28.0.2 androidx.appcompat:appcompat:1.0.0
    com.android.support:design:28.0.2 com.google.android.material:material:1.0.0
    com.android.support:support-v4:28.0.2 androidx.legacy:legacy-support-v4:1.0.0
    com.android.support:recyclerview-v7:28.0.2 androidx.recyclerview:recyclerview:1.0.0
    com.android.support.constraint:constraint-layout:1.1.2 androidx.constraintlayout:constraintlayout:1.1.2

     更多详细变化内容,可以下载CSV格式映射文件;

    2)常用支持库类对比:

    Support Library classAndroidX class
    android.support.v4.app.Fragment androidx.fragment.app.Fragment
    android.support.v4.app.FragmentActivity androidx.fragment.app.FragmentActivity
    android.support.v7.app.AppCompatActivity androidx.appcompat.app.AppCompatActivity
    android.support.v7.app.ActionBar androidx.appcompat.app.ActionBar
    android.support.v7.widget.RecyclerView androidx.recyclerview.widget.RecyclerView

     更多详细变化内容,可以下载CSV格式映射文件。



    作者:翻译不了的声响
    链接:https://www.jianshu.com/p/7dc111353328
    来源:简书

    其实android studio3.5里已经内置了这个库:

    implementation 'androidx.appcompat:appcompat:1.1.0'

    无须再次导入。

  • 相关阅读:
    Struts2 HelloWorld_1
    Java Web JavaMail 邮件发送
    Struts2 ActionWildcard(通配符配置)约定优于配置
    Struts2 Action
    Struts2 struts2简介
    Struts2 ActionMethod DMI(动态方法调用)
    Java Web Servlet过滤器
    com学习笔记(2)基本的com接口QueryInterface的实现
    com学习笔记(4)动态链接
    silverlight Visifire图表转图片偷天换日的做法
  • 原文地址:https://www.cnblogs.com/aocshallo1/p/12259476.html
Copyright © 2011-2022 走看看