没找到 class "android.support.constraint.ConstraintLayout"
Didn't find class "android.support.constraint.ConstraintLayout"
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
testImplementation 'junit:junit:4.12'
//androidTestImplementation 'androidx.test:runner:1.1.0-beta01'
//androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-beta01'
implementation 'com.google.android.material:material:1.0.0-beta01'
implementation 'androidx.cardview:cardview:1.0.0-beta01'
我正在尝试使用 androidx 库。虽然我已经添加了“
实施 'androidx.constraintlayout:constraintlayout:1.1.2'” 我收到此错误。
检查您的 xml 并查看您是否正在使用 androidx.constraintlayout.widget.ConstraintLayout
。
只需检查 .xml 文件。如果您使用 android.support.constraint.ConstraintLayout
将其替换为 androidx.constraintlayout.widget.ConstraintLayout
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
testImplementation 'junit:junit:4.12'
//androidTestImplementation 'androidx.test:runner:1.1.0-beta01'
//androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-beta01'
implementation 'com.google.android.material:material:1.0.0-beta01'
implementation 'androidx.cardview:cardview:1.0.0-beta01'
我正在尝试使用 androidx 库。虽然我已经添加了“ 实施 'androidx.constraintlayout:constraintlayout:1.1.2'” 我收到此错误。
检查您的 xml 并查看您是否正在使用 androidx.constraintlayout.widget.ConstraintLayout
。
只需检查 .xml 文件。如果您使用 android.support.constraint.ConstraintLayout
将其替换为 androidx.constraintlayout.widget.ConstraintLayout