简体   繁体   中英

jar file causes NoClassDefFoundError

I created a java project in eclipse and then i generated a runnable jar out of it. the java project has a class named DrivingModule. the jar file was imported in to an android project. but the problem is, when i run the android project the app crash as long as i use the class DrivingModule and i receive the following error

*06-01 11:38:10.481: E/AndroidRuntime(16751):   Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available*

and if i commented out the class DrivingModule, the App works normall. i referred to some questions but mainely they were explaining how to generate the jar and how to build the path, but i could not find any post about how to solve the error i am receiving.

why that class causes the App to crash and throw such error?

update

after refering to the answer of Bhaumik Thakkar the App did nt work until I checked the box of the added jar as shown in the image below

在此处输入图片说明

将罐子放入-> jdk-> lib-> ext,然后重试。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM