草庐IT

$androidx

全部标签

android - androidx 和 com.android.support 之间的区别

当我注意到我可以使用两个不同的依赖项时,我正要在我的项目中使用约束布局:com.android.support.constraint:constraint-layoutandroidx.constraintlayout:constraintlayout这两者之间有区别吗?还是有一些建议更可取?编辑Google将停止对com.android.support的支持,并提示用户迁移到新的androidx等效版本。Note:WiththereleaseofAndroid9.0(APIlevel28)thereisanewversionofthesupportlibrarycalledAndro

android - 来自 androidx 和 com.android.support 的重复类

我最近更新了我的AndroidStudio(我很确定Gradle版本),现在我在尝试编译我的项目时遇到了一堆错误。这是目前困扰我的一个:Duplicateclassandroid.support.v4.app.INotificationSideChannelfoundinmodulesclasses.jar(androidx.core:core:1.0.1)andclasses.jar(com.android.support:support-compat:26.1.0)后面还有很多类似的。我尝试删除所有使用com.android.support以支持androidx(请参阅here了解

android - 膨胀类 androidx.constraintlayout.widget.ConstraintLayout 时出错

使用AndroidStudio菜单选项Refactor->RefactortoAndroidx...迁移到Androidx包后...我收到以下错误:Errorinflatingclassandroidx.constraintlayout.widget.ConstraintLayout 最佳答案 确保约束布局更新到最新版本:implementation'androidx.constraintlayout:constraintlayout:2.1.3'并替换您的xml标记名称与在使用此快捷方式出现的每个地方:Windows:CTRL+S

android - 无法解析 android.support.design。迁移到 AndroidX 后

我正在尝试使用以下代码fragment获取Snackbar的TextView:snackbarView.findViewById(android.support.design.R.id.snackbar_text)但AndroidStudio不解析设计库。我怎样才能让这段代码工作? 最佳答案 使用此解决方案解决:snackbarView.findViewById(com.google.android.material.R.id.snackbar_text) 关于android-无法解析a

Flutter:无法迁移到 AndroidX

我试图将我的flutter应用程序导入AndroidStudio以迁移到Androidx,不确定这些步骤是否正确:FlutterProject>在AndroidStudio中打开Android模块。我的Android版本是3.2.0+,可以重构>迁移到AndroidX在尝试迁移到Androidx时,我收到了一个UnresolvedDependecies错误,指出:ERROR:Failedtoresolve:androidx.legacy:legacy-support-v4:27.1.1ShowinProjectStructuredialogAffectedModules:app我找不到

android - flutter 构建失败。 Android 依赖 'androidx.core:core' 具有不同版本的编译(1.0.0)和运行时(1.0.1)类路径

我正在尝试构建我的flutter应用程序,但它给出了这个错误:Androiddependency'androidx.core:core'hasdifferentversionforthecompile(1.0.0)andruntime(1.0.1)classpath.YoushouldmanuallysetthesameversionviaDependencyResolution这是我的android/build.gradle文件:buildscript{repositories{google()jcenter()}dependencies{classpath'com.android.

flutter - 所有与编译不同的 AndroidX 版本

我已将我的项目迁移到AndroidX,因为我遇到了一些错误,但现在我收到一个错误循环,表明androidX类的版本与编译时不同:Androiddependency'androidx.fragment:fragment'hasdifferentversionforthecompile(1.0.0-rc01)andruntime(1.1.0-alpha04)classpath.YoushouldmanuallysetthesameversionviaDependencyResolution而且它总是一个不同的类,我已经尝试过实现这段代码,但是每次我添加一行时,它都会给我其他与编译不同的类:

android - Flutter 无法在设备导入 androidx.annotation.Nullable 上运行应用程序

Initializinggradle...Resolvingdependencies...Gradletask'assembleDebug'...registerResGeneratingTaskisdeprecated,useregisterGeneratedResFolders(FileCollection)registerResGeneratingTaskisdeprecated,useregisterGeneratedResFolders(FileCollection)registerResGeneratingTaskisdeprecated,useregisterGenera

android-studio - 无法将 Flutter 项目迁移到 AndroidX

我在AndroidStudio中有一个Flutter项目。我计划迁移到AndroidX。每当我执行Refactor->MigratetoAndroidX时,AndroidStudio都会显示错误消息:YouneedtohavecompileSdksettoatleast28inyourmodulebuild.gradletomigratetoAndroidX.但是我已经在我的app/gradle.build文件中设置了compileSdkVersion28。我还有什么需要做的吗? 最佳答案 我能够解决我的问题:在AndroidStu

android - Androidx 迁移后 Unresolved reference R

在Gradle脚本的build.gradle(模块:app)中更新我的依赖项后,我的所有布局、字符串、由R定义的所有引用都不可用。我在模块应用程序中有以下代码:subprojects{project.configurations.all{resolutionStrategy.eachDependency{details->if(details.requested.group=='com.android.support'&&!details.requested.name.contains('multidex')){details.useVersion"28.0.0"}if(details