Open yaochangliang159 opened 5 years ago
You're on Android, which does not support anything past Java 6 APIs as far as I know. Your main issue is this:
Caused by: java.lang.ClassNotFoundException: Didn't find class "java.nio.file.attribute.FileAttribute"
I know next to nothing about the runtime environment for Android apps besides this. However, according to Google, there is support for Java 7 classes like this in more recent versions of the Android API.
Be aware that we have recently made the jump to requiring Java 8 in the latest versions of this library due to Apache POI also requiring it. I have absolutely no clue how that will affect your usage of this library in Android, but be careful and verify your app when you upgrade.
thank you very much
java.lang.NoClassDefFoundError: Failed resolution of: [Ljava/nio/file/attribute/FileAttribute; at com.monitorjbl.xlsx.impl.TempFileUtil.writeInputStreamToFile(TempFileUtil.java:11) at com.monitorjbl.xlsx.impl.StreamingWorkbookReader.init(StreamingWorkbookReader.java:88) at com.monitorjbl.xlsx.StreamingReader$Builder.open(StreamingReader.java:251) at com.ycl.kaoqin.MainActivity.noModelMultipleSheet(MainActivity.java:67) at com.ycl.kaoqin.MainActivity$1.onNavigationItemSelected(MainActivity.java:40) at android.support.design.widget.BottomNavigationView$1.onMenuItemSelected(BottomNavigationView.java:204) at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840) at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158) at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991) at android.support.design.internal.BottomNavigationMenuView$1.onClick(BottomNavigationMenuView.java:115) at android.view.View.performClick(View.java:5267) at android.view.View$PerformClick.run(View.java:21249) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635) Caused by: java.lang.ClassNotFoundException: Didn't find class "java.nio.file.attribute.FileAttribute" on path: DexPathList[[zip file "/data/app/com.ycl.kaoqin-2/base.apk"],nativeLibraryDirectories=[/data/app/com.ycl.kaoqin-2/lib/arm64, /vendor/lib64, /system/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at com.monitorjbl.xlsx.impl.TempFileUtil.writeInputStreamToFile(TempFileUtil.java:11) at com.monitorjbl.xlsx.impl.StreamingWorkbookReader.init(StreamingWorkbookReader.java:88) at com.monitorjbl.xlsx.StreamingReader$Builder.open(StreamingReader.java:251) at com.ycl.kaoqin.MainActivity.noModelMultipleSheet(MainActivity.java:67) at com.ycl.kaoqin.MainActivity$1.onNavigationItemSelected(MainActivity.java:40) at android.support.design.widget.BottomNavigationView$1.onMenuItemSelected(BottomNavigationView.java:204) at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840) at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158) at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991) at android.support.design.internal.BottomNavigationMenuView$1.onClick(BottomNavigationMenuView.java:115) at android.view.View.performClick(View.java:5267) at android.view.View$PerformClick.run(View.java:21249) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635) Suppressed: java.lang.ClassNotFoundException: java.nio.file.attribute.FileAttribute at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 20 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
my jdk is 1.8,is this problem??