草庐IT

androidX

全部标签

androidx.constraintlayout.widget.constraintlayout 没有可以拖动的链

我在我的布局中使用androidx.constraintlayout.widget.ConstraintLayout并且它不显示链,我也不能拖动任何小部件。我只需键入要使用的约束。这是androidxconstraintLayout的示例屏幕截图:androidx.constraintlayout.widget.ConstraintLayout但是当我尝试切换回:android.support.constraint.ConstraintLayout我可以看到它这里是支持constraintLayout的示例屏幕截图:android.support.constraint.Constrai

android - 使用 Dagger 2 注入(inject) Androidx fragment

我想使用dagger2注入(inject)我的Androidxfragment。在我的Activity中我有:publicclassMainActivityextendsAppCompatActivityimplementsHasSupportFragmentInjector{@InjectRepositoryrepository;@InjectDispatchingAndroidInjectordispatchingAndroidInjector;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCrea

android - 如何使用新的 androidx.lifecycle :*:2. 2.0-alpha01 获取 lifecycle.coroutineScope

2019年5月7日androidx.lifecycle:*:2.2.0-alpha01发布公告:ThisreleaseaddsnewfeaturesthataddssupportforKotlincoroutinesforLifecycleandLiveData.Detaileddocumentationonthemcanbefoundhere.关于documentation提到我可以获得LifecycleScope:eithervialifecycle.coroutineScopeorlifecycleOwner.lifecycleScopeproperties但是我好像一个也找不到

android - 没有找到类 "androidx.core.widget.DrawerLayout"

使用AndroidStudio菜单选项Refactor->RefactortoAndroidx迁移到Androidx包后...我的build.gradle看起来像implementation'androidx.appcompat:appcompat:1.1.0-alpha01'implementation'com.google.android.material:material:1.1.0-alpha01'implementation'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'在运行应用程序的过程中,我遇到了这个:D

安卓工作室 : Error: Program type already present: androidx. core.graphics.PathSegment

我使用的是AndroidStudio3.3Canary8。我创建了默认项目,然后尝试运行该项目。但我看到了以下堆栈跟踪:AGPBI:{"kind":"error","text":"Programtypealreadypresent:androidx.core.graphics.PathSegment","sources":[{}],"tool":"D8"}Task:app:buildInfoGeneratorDebugFAILURE:Buildfailedwithanexception.*Whatwentwrong:Executionfailedfortask':app:transfo

安卓工作室 3.5 警告 : The rule `-keep public class * extends androidx.versionedparcelable.VersionedParcelable { <init>(); }` uses extends

今天,我将我的AndroidStudio更新到了3.5。更新后,我在尝试运行该应用程序时发现以下警告。Therule-keeppublicclass*extendsandroidx.versionedparcelable.VersionedParcelable{();}usesextendsbutactuallymatchesimplements.我知道警告与我的混淆器规则有关。因此,我仔细检查了我的混淆器规则文件,但我确定我没有添加该规则,而且它不在我的混淆器规则文件中。下面是我构建项目时的警告。我的项目正在使用AndroidX。谁能知道可以跳过警告或警告来自哪里?任何想法或替代方式

android - 迁移到 AndroidX 后,错误膨胀类 android.support.design.widget.AppBarLayout

使用AndroidStudio将我的项目迁移到AndroidX后(并手动修复了很多导入错误),我没有遇到任何编译错误,但是当应用程序启动时我遇到了崩溃:Errorinflatingclassandroid.support.design.widget.AppBarLayout.布局文件中有问题的行是:我在build.gradle中的依赖项是:dependencies{deflifecycle_version='2.1.0-alpha02'//usedbelow--willbedifferentforandroidx(migrated2019-02-04)implementationfil

Androidx 和数据绑定(bind)

我正在将AndroidP测试的依赖项迁移到androidx依赖项。由于一些不太清楚的原因,我的项目不再编译(不,我不会提供详细信息以避免出现明显的问题)。我发现(通过gradlewdependencies)数据绑定(bind)使用“oldschool”依赖android.arch.lifecycle:runtime:1.0.3而不是androidx.lifecycle:生命周期运行时:2.0.0-beta01。我想这可能是原因之一。知道如何强制使用新的包名称/依赖项吗? 最佳答案 我遇到了类似的问题,DataBinding库使用支持

android - Flutter 项目和 Android X 迁移问题

我刚刚创建了一个新的flutter项目,添加了一些插件,并且我正在将插件切换到androidx,因此我需要切换到androidx。我已经尝试了所有不同的方式来迁移到androidx,但到目前为止没有一个对我有用。现在我什至不知道该做什么了,太令人沮丧了,为什么在自动创建新项目时不处理这个问题。可能在项目中使用ionic。 最佳答案 当您创建一个新项目时,只需关注@harsh'sanswer你就完成了。但是,由于我最近升级了现有应用程序以使用新插件,因此我也不得不迁移到AndroidX...以及officialinstructions

android - Flutter 项目和 Android X 迁移问题

我刚刚创建了一个新的flutter项目,添加了一些插件,并且我正在将插件切换到androidx,因此我需要切换到androidx。我已经尝试了所有不同的方式来迁移到androidx,但到目前为止没有一个对我有用。现在我什至不知道该做什么了,太令人沮丧了,为什么在自动创建新项目时不处理这个问题。可能在项目中使用ionic。 最佳答案 当您创建一个新项目时,只需关注@harsh'sanswer你就完成了。但是,由于我最近升级了现有应用程序以使用新插件,因此我也不得不迁移到AndroidX...以及officialinstructions