伙计,我遇到一个奇怪的错误,这让我发疯,请帮助我。 这是错误
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.zapps.mars/net.zapps.mars.UserPreferencesActivity}: android.view.InflateException: Binary XML file line #15: Binary XML file line #15: Error inflating class de.hdodenhof.circleimageview.CircleImageView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3194)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3302)
at android.app.ActivityThread.-wrap12(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
Caused by: android.view.InflateException: Binary XML file line #15: Binary XML file line #15: Error inflating class de.hdodenhof.circleimageview.CircleImageView
Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class de.hdodenhof.circleimageview.CircleImageView
Caused by: java.lang.ClassNotFoundException: Didn't find class "de.hdodenhof.circleimageview.CircleImageView" on path: DexPathList[[zip file "/data/app/net.zapps.mars-ttDnBZn3oo8rm4zh7vudMQ==/base.apk"],nativeLibraryDirectories=[/data/app/net.zapps.mars-ttDnBZn3oo8rm4zh7vudMQ==/lib/arm64, /data/app/net.zapps.mars-ttDnBZn3oo8rm4zh7vudMQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:801)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:874)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:835)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at net.zapps.mars.UserPreferencesActivity.onCreate(UserPreferencesActivity.java:64)
at android.app.Activity.performCreate(Activity.java:7372)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3147)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3302)
at android.app.ActivityThread.-wrap12(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
这是我的布局
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/upDP"
android:layout_width="180dp"
android:layout_height="180dp"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="8dp"
android:src="@drawable/ic_man"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
我已经阅读了该错误(java.lang.ClassNotFoundException:找不到class)与某些Multidex相关。但是我没有用。请帮助我。
我已经完成了清理项目的所有工作。使缓存无效。删除构建文件夹等。什么都没有。
按照此处的确切步骤操作:https://github.com/hdodenhof/CircleImageView 图书馆只能在我的一个旧应用中使用,而不能在该应用中使用