当前位置: 首页 > 工具软件 > androidx > 使用案例 >

android 依赖代码,如何在Android中排除Androidx或强制不使用Androidx依赖关系

田兴旺
2023-12-01

implementation 'com.google.android.libraries.places:places:2.2.0'

一些依赖关系开始使用

androidx

这就造成了一些问题

aapt errors and others

安卓立德

在新的地方图书馆实施后。我想保持旧的东西与新的地方自动完成api。如何我可以排除它们还是强制不使用

安卓立德

+--- androidx.fragment:fragment:1.0.0@aar

+--- androidx.recyclerview:recyclerview:1.0.0@aar

+--- androidx.legacy:legacy-support-core-ui:1.0.0@aar

+--- androidx.legacy:legacy-support-core-utils:1.0.0@aar

+--- androidx.loader:loader:1.0.0@aar

+--- androidx.viewpager:viewpager:1.0.0@aar

+--- androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar

+--- androidx.drawerlayout:drawerlayout:1.0.0@aar

+--- androidx.slidingpanelayout:slidingpanelayout:1.0.0@aar

+--- androidx.customview:customview:1.0.0@aar

+--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0@aar

+--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0@aar

+--- androidx.core:core:1.0.0@aar

+--- androidx.cardview:cardview:1.0.0@aar

+--- androidx.lifecycle:lifecycle-viewmodel:2.0.0@aar

+--- androidx.versionedparcelable:versionedparcelable:1.0.0@aar

+--- androidx.collection:collection:1.0.0@jar

+--- androidx.lifecycle:lifecycle-runtime:2.0.0@aar

+--- androidx.interpolator:interpolator:1.0.0@aar

+--- androidx.cursoradapter:cursoradapter:1.0.0@aar

+--- androidx.documentfile:documentfile:1.0.0@aar

+--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0@aar

+--- androidx.print:print:1.0.0@aar

+--- androidx.lifecycle:lifecycle-livedata:2.0.0@aar

+--- androidx.lifecycle:lifecycle-livedata-core:2.0.0@aar

+--- androidx.lifecycle:lifecycle-common:2.0.0@jar

+--- androidx.arch.core:core-runtime:2.0.0@aar

+--- androidx.arch.core:core-common:2.0.0@jar

+--- androidx.annotation:annotation:1.0.0@jar

+--- androidx.appcompat:appcompat:1.0.0@aar

+--- androidx.cardview:cardview:1.0.0@aar

+--- androidx.fragment:fragment:1.0.0@aar

+--- androidx.recyclerview:recyclerview:1.0.0@aar

implementation ('com.google.android.libraries.places:places:2.0.0'){

exclude group: 'androidx.core', module: 'core'

}

安卓内部的这个选项

packagingOptions {

exclude 'META-INF/androidx.*'

exclude 'META-INF/proguard/androidx-*'

}

还试图在我的项目级别强制执行特定版本生成.gradle

configurations {

all {

resolutionStrategy {

force 'com.google.android.gms:play-services-location:11.8.0'

force 'com.google.android.gms:play-services-maps:11.8.0'

force 'com.google.android.gms:play-services-clearcut:11.8.0'

force 'com.google.android.gms:play-services-phenotype:11.8.0'

force 'com.google.android.gms:play-services-base:11.8.0'

forece 'com.google.android.gms:play-services-places-placereport:11.8.0'

force 'com.google.android.gms:play-services-tasks:11.8.0'

force 'com.google.android.gms:play-services-basement:11.8.0'

}

}

}

在我的下面梯度属性

android.useAndroidX=false

android.enableJetifier=false

但什么都没有工作。怎么做我能帮上忙吗

 类似资料: