【发布时间】:2020-05-29 22:28:52
【问题描述】:
我正在尝试使用this tutorial on YouTube 将this library 添加到Android Studio 本地。
但是,我收到了无法在此处发布的错误,因为它们太多 (99+)。
有人可以逐步(详细)告诉我如何成功地将这个库添加到我的项目中并能够在之后对其进行编辑吗?
这是我尝试导入此库时遇到的主要错误:`无法确定构造函数参数 #1:缺少 Factory 类型的参数,或者没有 Factory 类型的服务。
我的 build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
【问题讨论】:
-
有一个大的弃用通知,包括该组件将在 2019-01-29 之后不再工作的声明。
-
所以你在问如何添加这个库,但你实际上想添加一个不同的库!?
-
您能至少发布一些您遇到的错误吗?
-
你的应用迁移到androidx了吗?
-
@mirsaidoff 是的。
标签: java android android-studio kotlin