亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

ClassNotFoundException:沒有找到類

ClassNotFoundException:沒有找到類

ABOUTYOU 2023-05-10 14:06:55
我對 Gradle 文件進行了一些更改,當我嘗試運行該應用程序時出現此錯誤:java.lang.ClassNotFoundException:沒有找到類“androidx.support.constraint.ConstraintLayout”----------XML------------<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:configChanges = "orientation|keyboardHidden"    tools:context=".MainActivity">    <ImageView        android:id="@+id/imageView"        android:layout_width="607dp"        android:layout_height="313dp"        android:layout_marginStart="8dp"        android:layout_marginTop="8dp"        android:layout_marginEnd="8dp"        android:layout_marginBottom="8dp"        app:layout_constraintBottom_toBottomOf="parent"        app:layout_constraintEnd_toEndOf="parent"        app:layout_constraintStart_toStartOf="parent"        app:layout_constraintTop_toTopOf="parent"        app:srcCompat="@mipmap/ic_launcher" /></android.support.constraint.ConstraintLayout>----------搖籃應用--------apply plugin: 'com.android.application'android {    compileSdkVersion 28    defaultConfig {        applicationId "com.example.eladk.flagged"        minSdkVersion 27        targetSdkVersion 28        versionCode 1        versionName "1.0"        testInstrumentationRunner     "android.support.test.runner.AndroidJUnitRunner"        }        buildTypes {            release {                minifyEnabled false                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'            }        }    }
查看完整描述

1 回答

?
千巷貓影

TA貢獻1829條經驗 獲得超7個贊

您應該將您的項目遷移到 AndroidX,例如ConstraintLayout

 implementation "androidx.constraintlayout:constraintlayout:$constraintLayout_version"



查看完整回答
反對 回復 2023-05-10
  • 1 回答
  • 0 關注
  • 113 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號