“Error inflating class of binary XML file in CardView.”

huangapple go评论82阅读模式
英文:

Error inflating class of binary xml file in Cardview

问题

以下是你提供的Java文件的翻译部分:

package com.impwala.impwala;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;

public class hschome extends AppCompatActivity implements View.OnClickListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_hschome);

        CardView card1 = findViewById(R.id.card1);
        CardView card2 = findViewById(R.id.card2);
        CardView card3 = findViewById(R.id.card3);
        CardView card4 = findViewById(R.id.card4);
        CardView card5 = findViewById(R.id.card5);

        card1.setOnClickListener(this);
        card2.setOnClickListener(this);
        card3.setOnClickListener(this);
        card4.setOnClickListener(this);
        card5.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.card1:
                openActivity();
                break;
            case R.id.card2:
                openActivity2();
                break;
            case R.id.card3:
                openActivity3();
                break;
            case R.id.card4:
                openActivity4();
                break;
            case R.id.card5:
                openActivity5();
                break;
        }
    }
    public void openActivity(){
        Intent intent1=new Intent(this,Math.class);
        startActivity(intent1);
    }
    public void openActivity2(){
        Intent intent2=new Intent(this,Physics.class);
        startActivity(intent2);
    }
    public void openActivity3(){
        Intent intent3=new Intent(this,Biology.class);
        startActivity(intent3);
    }
    public void openActivity4(){
        Intent intent4=new Intent(this,Chemistry.class);
        startActivity(intent4);

    }
    public void openActivity5() {
        Intent intent5;
        intent5 = new Intent(this, English.class);
        startActivity(intent5);
    }
}

由于篇幅有限,无法逐行翻译整个XML和Build文件。如果你需要对特定部分进行翻译或有其他问题,请随时提问。另外,你提供的错误信息表明应用在启动过程中遇到了一些问题,可能与布局文件或依赖库的设置有关。你可以尝试根据错误信息中的指示来解决问题。

英文:

This is my Java file which is not opening

package com.impwala.impwala;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
public class hschome extends AppCompatActivity implements View.OnClickListener{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hschome);
CardView card1 = findViewById(R.id.card1);
CardView card2 = findViewById(R.id.card2);
CardView card3 = findViewById(R.id.card3);
CardView card4 = findViewById(R.id.card4);
CardView card5 = findViewById(R.id.card5);
card1.setOnClickListener(this);
card2.setOnClickListener(this);
card3.setOnClickListener(this);
card4.setOnClickListener(this);
card5.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.card1:
openActivity();
break;
case R.id.card2:
openActivity2();
break;
case R.id.card3:
openActivity3();
break;
case R.id.card4:
openActivity4();
break;
case R.id.card5:
openActivity5();
break;
}
}
public void openActivity(){
Intent intent1=new Intent(this,Math.class);
startActivity(intent1);
}
public void openActivity2(){
Intent intent2=new Intent(this,Physics.class);
startActivity(intent2);
}
public void openActivity3(){
Intent intent3=new Intent(this,Biology.class);
startActivity(intent3);
}
public void openActivity4(){
Intent intent4=new Intent(this,Chemistry.class);
startActivity(intent4);
}
public void openActivity5() {
Intent intent5;
intent5 = new Intent(this, English.class);
startActivity(intent5);
}
}

This is the XML file of my layout

<?xml version="1.0" encoding="utf-8"?>
<GridLayout 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:background="@drawable/gradient"
tools:context=".hschome">
<androidx.appcompat.widget.LinearLayoutCompat
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_weight="2"
android:layout_width="match_parent"
android:layout_height="0dp">
<TextView
android:id="@+id/textGrid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/hsc_board"
android:textColor="#8b1a1a "
android:textSize="36sp"
android:textStyle="bold" />
</RelativeLayout>
<GridLayout
android:id="@+id/mainGrid"
android:rowCount="1"
android:columnCount="1"
android:alignmentMode="alignMargins"
android:columnOrderPreserved="false"
android:layout_weight="4"
android:layout_width="match_parent"
android:layout_height="0dp"
android:padding="30dp"
>
<!-- ROW 1  -->
<!-- COLUMN 1  -->
<androidx.cardview.widget.CardView
android:id="@+id/card1"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_marginBottom="16dp"
android:layout_rowWeight="1"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:cardElevation="8dp"
app:cardCornerRadius="30dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color1" />
<LinearLayout
android:layout_gravity="center_horizontal|center_vertical"
android:layout_margin="16dp"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:textAlignment="center"
android:text="@string/mathematics"
android:textColor="#000"
android:textSize="18sp"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- COLUMN 2  -->
<androidx.cardview.widget.CardView
android:id="@+id/card2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_marginBottom="16dp"
android:layout_rowWeight="1"
app:cardBackgroundColor="@drawable/gradient2"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:cardElevation="8dp"
app:cardCornerRadius="30dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color1" />
<LinearLayout
android:layout_gravity="center_horizontal|center_vertical"
android:layout_margin="16dp"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:textAlignment="center"
android:text="@string/physics"
android:textColor="#000"
android:textSize="18sp"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- ROW 2  -->
<!-- COLUMN 1  -->
<androidx.cardview.widget.CardView
android:id="@+id/card3"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_marginBottom="16dp"
android:layout_rowWeight="1"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:cardElevation="8dp"
app:cardCornerRadius="30dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color1" />
<LinearLayout
android:layout_gravity="center_horizontal|center_vertical"
android:layout_margin="16dp"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/biology"
android:textAlignment="center"
android:textColor="#000"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- COLUMN 2  -->
<androidx.cardview.widget.CardView
android:id="@+id/card4"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_marginBottom="16dp"
android:layout_rowWeight="1"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:cardElevation="8dp"
app:cardCornerRadius="30dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color1" />
<LinearLayout
android:layout_gravity="center_horizontal|center_vertical"
android:layout_margin="16dp"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/chemistry"
android:textAlignment="center"
android:textColor="#000"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- ROW 3  -->
<!-- COLUMN 1  -->
<androidx.cardview.widget.CardView
android:id="@+id/card5"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_columnWeight="1"
android:layout_marginBottom="16dp"
android:layout_rowWeight="1"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:cardElevation="8dp"
app:cardCornerRadius="30dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color1" />
<LinearLayout
android:layout_gravity="center_horizontal|center_vertical"
android:layout_margin="16dp"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:textAlignment="center"
android:text="@string/english"
android:textColor="#000"
android:textSize="18sp"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- COLUMN 2  -->
</GridLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</GridLayout>

And this the build file of my app

apply plugin: 'com.android.application'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.impwala.impwala"
minSdkVersion 21
targetSdkVersion 29
versionCode 2
versionName "1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.core:core-ktx:1.5.0-alpha02'
implementation "androidx.constraintlayout:constraintlayout:2.0.1"
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//add library
implementation 'gr.pantrif:easy-android-splash-screen:0.0.1'
implementation 'commons-io:commons-io:2.6'
implementation 'androidx.cardview:cardview:1.0.0'
}
apply plugin: 'com.google.gms.google-services'

The error I am getting in Logcat is very hard and not getting solved. I don't know what is the problem. But When I open the file it crashes.
It crashes with the message showing the error at the line from java file of linking of layout and java file. Line no. 15 or 14 of something in my case.
I don't know if the problem is of onclicklistener or ANdroidJUnit or deprecated attribute or cardview or anything else.

here is the error I am getting

  java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[],nativeLibraryDirectories=[/data/app/com.tencent.ig--bBLUItSBvy1ZOEIt--4Tw==/lib/arm, /data/app/com.tencent.ig--bBLUItSBvy1ZOEIt--4Tw==/base.apk!/lib/armeabi-v7a, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:171)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.LoadedApk.createAppFactory(LoadedApk.java:228)
at android.app.LoadedApk.updateApplicationInfo(LoadedApk.java:340)
at android.app.ActivityThread.handleDispatchPackageBroadcast(ActivityThread.java:5497)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at com.android.server.SystemServer.run(SystemServer.java:474)
at com.android.server.SystemServer.main(SystemServer.java:308)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:853)
2020-08-30 10:48:19.230 2893-2893/? E/LoadedApk: Unable to instantiate appComponentFactory
java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[],nativeLibraryDirectories=[/data/app/com.tencent.ig--bBLUItSBvy1ZOEIt--4Tw==/lib/arm, /data/app/com.tencent.ig--bBLUItSBvy1ZOEIt--4Tw==/base.apk!/lib/armeabi-v7a, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:171)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.LoadedApk.createAppFactory(LoadedApk.java:228)
at android.app.LoadedApk.updateApplicationInfo(LoadedApk.java:340)
at android.app.ActivityThread.handleDispatchPackageBroadcast(ActivityThread.java:5497)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at com.android.server.SystemServer.run(SystemServer.java:474)
at com.android.server.SystemServer.main(SystemServer.java:308)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:853)
2020-08-30 10:48:19.288 5838-5868/? E/MiuiSysImpl: READ_PHONE_STATE permission not granted
2020-08-30 10:48:19.347 5838-5857/? E/MiuiSysImpl: READ_PHONE_STATE permission not granted
2020-08-30 10:48:19.452 5904-5904/? E/ctivate.servic: Not starting debugger since process cannot load the jdwp agent.
2020-08-30 10:48:19.475 5863-5903/? E/##XLogger##: com.miui.cloudservice.cloudcontrol.@IPV6@SourceFile:2, thread:96480--cloud config is not expired , request canceled
2020-08-30 10:48:19.484 5926-5926/? E/com.xiaomi.xms: Not starting debugger since process cannot load the jdwp agent.
2020-08-30 10:48:19.638 5904-5904/? E/libc: Access denied finding property "ro.vendor.display.type"
2020-08-30 10:48:19.656 5948-5948/? E/.android.camer: Not starting debugger since process cannot load the jdwp agent.
2020-08-30 10:48:19.657 5926-5926/? E/libc: Access denied finding property "ro.vendor.display.type"
2020-08-30 10:48:19.863 5904-5942/? E/MiuiSysImpl: READ_PHONE_STATE permission not granted
2020-08-30 10:48:19.884 5948-5948/? E/libc: Access denied finding property "ro.vendor.display.type"
2020-08-30 10:48:20.006 5904-5931/? E/MiuiSysImpl: READ_PHONE_STATE permission not granted
2020-08-30 10:48:20.046 5948-5948/? E/libc: Access denied finding property "ro.boot.hwversion"
2020-08-30 10:48:20.108 5987-5987/? E/com.android.mm: Not starting debugger since process cannot load the jdwp agent.
2020-08-30 10:48:20.213 5948-6013/? E/CAM_WatermarkMiSysUtils: isFileExist NO Permission!!!!
2020-08-30 10:48:20.213 5948-6013/? E/CAM_WatermarkMiSysUtils: isFileExist NO Permission!!!!
2020-08-30 10:48:20.240 5987-5987/? E/com.android.mm: Dex checksum does not match for dex: /system/framework/com.google.android.maps.jar.Expected: 3079070930, actual: 1845989642
2020-08-30 10:48:20.320 5987-5987/? E/libc: Access denied finding property "ro.vendor.display.type"
2020-08-30 10:48:20.920 6095-6095/? E/iui.micloudsyn: Not starting debugger since process cannot load the jdwp agent.
2020-08-30 10:48:21.112 6095-6095/? E/libc: Access denied finding property "ro.vendor.display.type"
2020-08-30 10:48:21.125 5987-6083/? E/RcsService: initMaap
java.lang.SecurityException: Failed to find provider chatbotinfo for user 10; expected to find a valid ContentProvider for this authority
at android.os.Parcel.createException(Parcel.java:1953)
at android.os.Parcel.readException(Parcel.java:1921)
at android.os.Parcel.readException(Parcel.java:1871)
at android.content.IContentService$Stub$Proxy.registerContentObserver(IContentService.java:849)
at android.content.ContentResolver.registerContentObserver(ContentResolver.java:1988)
at android.content.ContentResolver.registerContentObserver(ContentResolver.java:1977)
at com.juphoon.helper.RcsChatbotManager.init(SourceFile:3)
at com.xiaomi.rcs.tool.RcsService.initMaap(SourceFile:2)
at com.xiaomi.rcs.tool.RcsService.access$500(SourceFile:1)
at com.xiaomi.rcs.tool.RcsService$2.run(SourceFile:1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.content.ContentService.registerContentObserver(ContentService.java:340)
at android.content.IContentService$Stub.onTransact(IContentService.java:76)
at com.android.server.content.ContentService.onTransact(ContentService.java:262)
at android.os.Binder.execTransact(Binder.java:726)
2020-08-30 10:48:21.392 2893-3047/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
2020-08-30 10:48:22.044 6125-6125/? E/.android.camer: Not starting debugger since process cannot load the jdwp agent.
2020-08-30 10:48:22.167 6125-6125/? E/libc: Access denied finding property "ro.vendor.display.type"
2020-08-30 10:48:22.273 6125-6125/? E/libc: Access denied finding property "ro.boot.hwversion"
2020-08-30 10:48:22.435 6125-6142/? E/CAM_WatermarkMiSysUtils: isFileExist NO Permission!!!!
2020-08-30 10:48:22.435 6125-6142/? E/CAM_WatermarkMiSysUtils: isFileExist NO Permission!!!!
2020-08-30 10:48:22.973 5755-5755/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.impwala.impwala, PID: 5755
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.impwala.impwala/com.impwala.impwala.hschome}: android.view.InflateException: Binary XML file line #92: Binary XML file line #92: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3119)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1839)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6861)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: android.view.InflateException: Binary XML file line #92: Binary XML file line #92: Error inflating class <unknown>
Caused by: android.view.InflateException: Binary XML file line #92: Error inflating class <unknown>
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:651)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:794)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:734)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:867)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:828)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:870)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:828)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:870)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:828)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:696)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
at com.impwala.impwala.hschome.onCreate(hschome.java:14)
at android.app.Activity.performCreate(Activity.java:7232)
at android.app.Activity.performCreate(Activity.java:7221)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2964)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3119)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1839)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6861)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: android.content.res.Resources$NotFoundException: Can't find ColorStateList from drawable resource ID #0x7f07006e
at android.content.res.ResourcesImpl.loadColorStateList(ResourcesImpl.java:1054)
at android.content.res.Resources.loadColorStateList(Resources.java:1055)
2020-08-30 10:48:22.973 5755-5755/? E/AndroidRuntime:     at android.content.res.TypedArray.getColorStateList(TypedArray.java:551)
at androidx.cardview.widget.CardView.<init>(CardView.java:127)
at androidx.cardview.widget.CardView.<init>(CardView.java:117)
... 32 more

please help me.

答案1

得分: 2

在drawble中检查以下资源。错误可能存在于该渐变或资源本身不可用。
android:background="@drawable/gradient"

英文:

Check the Following resource in drawble. The error might be present in that gradient or the resource it self not available
android:background="@drawable/gradient"

答案2

得分: 0

尝试检查是否创建了"@color/color1"

英文:

Try to check if the "@color/color1" are created

huangapple
  • 本文由 发表于 2020年8月30日 13:41:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/63654339.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定