当前位置: 首页 > 知识库问答 >
问题:

如何解决问题“二进制XML文件行#11:二进制XML文件列#11:扩展类com.evrencoskun.tableview.tableview时出错”

鲍健柏
2023-03-14

我下载了表视图jar文件库并复制到我项目中的libs文件夹,然后将其从File-

二进制XML文件行#11:二进制XML文件行#11:inflating类com . evren coskun . table view . table view时出错

 Caused by: android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class com.evrencoskun.tableview.TableView
 Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class com.evrencoskun.tableview.TableView
 Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Constructor.newInstance0(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
    at android.view.LayoutInflater.createView(LayoutInflater.java:645)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
    at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
    at com.example.farzad.table.MainActivity.onCreate(MainActivity.java:13)
    at android.app.Activity.performCreate(Activity.java:6679)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
    at android.app.ActivityThread.-wrap12(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6119)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
 Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/evrencoskun/tableview/R$dimen;
    at com.evrencoskun.tableview.TableView.initialDefaultValues(TableView.java:129)
    at com.evrencoskun.tableview.TableView.<init>(TableView.java:116)
    at java.lang.reflect.Constructor.newInstance0(Native Method) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:430) 
    at android.view.LayoutInflater.createView(LayoutInflater.java:645) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:518) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:426) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:377) 
    at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) 
    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
    at com.example.farzad.table.MainActivity.onCreate(MainActivity.java:13) 
    at android.app.Activity.performCreate(Activity.java:6679) 
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) 
    at android.app.ActivityThread.-wrap12(ActivityThread.java) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:154) 
    at android.app.ActivityThread.main(ActivityThread.java:6119) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.evrencoskun.tableview.R$dimen" on path: DexPathList[[zip file "/data/app/com.example.farzad.table-2/base.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.farzad.table-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.farzad.table-2/lib/x86, /system/lib, /vendor/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

   <com.evrencoskun.tableview.TableView
       android:layout_width="match_parent"
       android:layout_height="match_parent">
   </com.evrencoskun.tableview.TableView>
</LinearLayout
package com.example.farzad.table;

import android.support.v7.app.AppCompatActivity; 导入Android捆绑包;

公共类主要活动扩展AppCompat活动{

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

}

我不想通过以下方式添加此库:

编译'com.evrencoskun.library: tableview: 0.8.8'

因为我想更改它并将离线添加到我的项目中。

共有1个答案

翟嘉志
2023-03-14

您遇到了这个问题,因为您添加的jar没有编译。也许你做得不对。

与其告诉在android Studio中添加jar的方法,我想告诉你,如果你想编辑那个库。您可以从库github页面克隆它,并将下载的模块添加到Android Studio中的应用程序中。

 类似资料: