安卓项目库添加Android_DataGridView

安卓添加应用在gradle添加引用

在引用的情况下会出现以下情况

安卓项目库添加Android_DataGridView_第1张图片

引用这个库的情况下按照readme文件进行操作

安卓项目库添加Android_DataGridView_第2张图片

在build.gradle中添加上图的操作代码

安卓项目库添加Android_DataGridView_第3张图片

在setting.gradle中操作

安卓项目库添加Android_DataGridView_第4张图片

经过上述操作,可以完成初步的gradle的配置,但是在编译项目的时候会出现错误

安卓项目库添加Android_DataGridView_第5张图片
安卓项目库添加Android_DataGridView_第6张图片

问题描述

> Task :app:dataBindingMergeDependencyArtifactsDebug UP-TO-DATE
AGPBI: {"kind":"warning","text":"Your project has set `android.useAndroidX=true`, but configuration `:app:debugRuntimeClasspath` still contains legacy support libraries, which may cause runtime issues.\nThis behavior will not be allowed in Android Gradle plugin 8.0.\nPlease use only AndroidX dependencies or set `android.enableJetifier=true` in the `gradle.properties` file to migrate your project to AndroidX (see https://developer.android.com/jetpack/androidx/migrate for more info).\nThe following legacy support libraries are detected:\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-compat:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:appcompat-v7:25.4.0 -> com.android.support:support-annotations:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-media-compat:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-core-utils:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-core-ui:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-fragment:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:appcompat-v7:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:appcompat-v7:25.4.0 -> com.android.support:support-vector-drawable:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:appcompat-v7:25.4.0 -> com.android.support:animated-vector-drawable:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:recyclerview-v7:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:transition:25.4.0\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support.constraint:constraint-layout:1.0.2\n:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support.constraint:constraint-layout:1.0.2 -> com.android.support.constraint:constraint-layout-solver:1.0.2","sources":[{}]}

Your project has set `android.useAndroidX=true`, but configuration `:app:debugRuntimeClasspath` still contains legacy support libraries, which may cause runtime issues.
This behavior will not be allowed in Android Gradle plugin 8.0.
Please use only AndroidX dependencies or set `android.enableJetifier=true` in the `gradle.properties` file to migrate your project to AndroidX (see https://developer.android.com/jetpack/androidx/migrate for more info).
The following legacy support libraries are detected:
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-compat:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:appcompat-v7:25.4.0 -> com.android.support:support-annotations:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-media-compat:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-core-utils:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-core-ui:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:support-v4:25.4.0 -> com.android.support:support-fragment:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:appcompat-v7:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:appcompat-v7:25.4.0 -> com.android.support:support-vector-drawable:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:appcompat-v7:25.4.0 -> com.android.support:animated-vector-drawable:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:recyclerview-v7:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support:design:25.4.0 -> com.android.support:transition:25.4.0
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support.constraint:constraint-layout:1.0.2
:app:debugRuntimeClasspath -> com.github.Lingber:Android_DataGridView:1.01 -> com.android.support.constraint:constraint-layout:1.0.2 -> com.android.support.constraint:constraint-layout-solver:1.0.2


真的是要细心看弹出的错误,百度有的时候真不一定能解决问题
安卓项目库添加Android_DataGridView_第7张图片
在这里给出了解决方法
安卓项目库添加Android_DataGridView_第8张图片
安卓项目库添加Android_DataGridView_第9张图片
安卓项目库添加Android_DataGridView_第10张图片
完美编译没有报错

你可能感兴趣的:(学习文件记录,Android开发学习,android,gradle,android,studio)