2

我有一个支持即时应用程序的 android 项目。所以,我有这些在base feature

api 'androidx.appcompat:appcompat:1.0.0-alpha1'
api 'androidx.constraintlayout:constraintlayout:1.1.0'
api "androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1"

当我有这些

installable app

未启动并出现以下错误

未找到默认活动

当我删除

api "androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1"

installable app

不会给出错误,但当然我在这里缺少直接依赖,所以它不会构建。

我已经尝试了支持库的每个版本以及新架构组件的每个版本和模块,我什至尝试使用

implementation

代替

api

但没有任何效果。

似乎架构组件破坏了即时应用程序。

这里还有依赖项。

+--- androidx.appcompat:appcompat:1.0.0-alpha1
|    +--- androidx.annotation:annotation:1.0.0-alpha1
|    +--- androidx.core:core:1.0.0-alpha1
|    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    +--- androidx.collection:collection:1.0.0-alpha1
|    |    |    \--- androidx.annotation:annotation:1.0.0-alpha1
|    |    \--- androidx.lifecycle:lifecycle-runtime:2.0.0-alpha1
|    |         +--- androidx.lifecycle:lifecycle-common:2.0.0-alpha1
|    |         |    \--- androidx.annotation:annotation:1.0.0-alpha1
|    |         +--- androidx.arch.core:core-common:2.0.0-alpha1
|    |         |    \--- androidx.annotation:annotation:1.0.0-alpha1
|    |         \--- androidx.annotation:annotation:1.0.0-alpha1
|    +--- androidx.collection:collection:1.0.0-alpha1 (*)
|    +--- androidx.cursoradapter:cursoradapter:1.0.0-alpha1
|    |    \--- androidx.annotation:annotation:1.0.0-alpha1
|    +--- androidx.legacy:legacy-support-core-utils:1.0.0-alpha1
|    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    +--- androidx.core:core:1.0.0-alpha1 (*)
|    |    +--- androidx.documentfile:documentfile:1.0.0-alpha1
|    |    |    \--- androidx.annotation:annotation:1.0.0-alpha1
|    |    +--- androidx.loader:loader:1.0.0-alpha1
|    |    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    +--- androidx.core:core:1.0.0-alpha1 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0-alpha1
|    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0-alpha1 (*)
|    |    |    |    +--- androidx.arch.core:core-common:2.0.0-alpha1 (*)
|    |    |    |    \--- androidx.arch.core:core-runtime:2.0.0-alpha1
|    |    |    |         +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    |         \--- androidx.arch.core:core-common:2.0.0-alpha1 (*)
|    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-alpha1
|    |    |         \--- androidx.annotation:annotation:1.0.0-alpha1
|    |    +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0-alpha1
|    |    |    \--- androidx.annotation:annotation:1.0.0-alpha1
|    |    \--- androidx.print:print:1.0.0-alpha1
|    |         \--- androidx.annotation:annotation:1.0.0-alpha1
|    +--- androidx.fragment:fragment:1.0.0-alpha1
|    |    +--- androidx.core:core:1.0.0-alpha1 (*)
|    |    +--- androidx.legacy:legacy-support-core-ui:1.0.0-alpha1
|    |    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    +--- androidx.core:core:1.0.0-alpha1 (*)
|    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0-alpha1 (*)
|    |    |    +--- androidx.customview:customview:1.0.0-alpha1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    |    \--- androidx.core:core:1.0.0-alpha1 (*)
|    |    |    +--- androidx.viewpager:viewpager:1.0.0-alpha1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    |    +--- androidx.core:core:1.0.0-alpha1 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-alpha1 (*)
|    |    |    +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0-alpha1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    |    +--- androidx.core:core:1.0.0-alpha1 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-alpha1 (*)
|    |    |    +--- androidx.drawerlayout:drawerlayout:1.0.0-alpha1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    |    +--- androidx.core:core:1.0.0-alpha1 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-alpha1 (*)
|    |    |    +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0-alpha1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    |    +--- androidx.core:core:1.0.0-alpha1 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0-alpha1 (*)
|    |    |    +--- androidx.interpolator:interpolator:1.0.0-alpha1
|    |    |    |    \--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0-alpha1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    |    +--- androidx.core:core:1.0.0-alpha1 (*)
|    |    |    |    \--- androidx.interpolator:interpolator:1.0.0-alpha1 (*)
|    |    |    +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0-alpha1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    |    |    \--- androidx.core:core:1.0.0-alpha1 (*)
|    |    |    \--- androidx.cursoradapter:cursoradapter:1.0.0-alpha1 (*)
|    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0-alpha1 (*)
|    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    +--- androidx.loader:loader:1.0.0-alpha1 (*)
|    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-alpha1 (*)
|    +--- androidx.vectordrawable:vectordrawable:1.0.0-alpha1
|    |    +--- androidx.annotation:annotation:1.0.0-alpha1
|    |    \--- androidx.core:core:1.0.0-alpha1 (*)
|    \--- androidx.vectordrawable:vectordrawable-animated:1.0.0-alpha1
|         +--- androidx.vectordrawable:vectordrawable:1.0.0-alpha1 (*)
|         \--- androidx.legacy:legacy-support-core-ui:1.0.0-alpha1 (*)
+--- androidx.constraintlayout:constraintlayout:1.1.0
|    \--- androidx.constraintlayout:constraintlayout-solver:1.1.0
\--- androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1
     +--- androidx.lifecycle:lifecycle-runtime:2.0.0-alpha1 (*)
     +--- androidx.arch.core:core-common:2.0.0-alpha1 (*)
     +--- androidx.arch.core:core-runtime:2.0.0-alpha1 (*)
     +--- androidx.fragment:fragment:1.0.0-alpha1 (*)
     +--- androidx.lifecycle:lifecycle-common:2.0.0-alpha1 (*)
     +--- androidx.lifecycle:lifecycle-livedata:2.0.0-alpha1
     |    +--- androidx.arch.core:core-runtime:2.0.0-alpha1 (*)
     |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0-alpha1 (*)
     |    \--- androidx.arch.core:core-common:2.0.0-alpha1 (*)
     +--- androidx.lifecycle:lifecycle-process:2.0.0-alpha1
     |    \--- androidx.lifecycle:lifecycle-runtime:2.0.0-alpha1 (*)
     +--- androidx.lifecycle:lifecycle-service:2.0.0-alpha1
     |    \--- androidx.lifecycle:lifecycle-runtime:2.0.0-alpha1 (*)
     \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0-alpha1 (*)
4

0 回答 0