Recently, I took over a very old Android project of the company, Eclipse development (two years ago), and encountered a series of problems during the import process.


1. Introduced package compilation environment problems: first of all, I asked the previous developer to compile version 6.0, and it did not report errors (later I used 8.0 compilation is also ok);


2. The project guide package address problem, you need to right-click the project to choose the last click Android, remove the wrong address of the project add again;


3. After the import project does not report errors, the program crashes after modifying the code slightly:

08-22 16:16:11. 440: E/AndroidRuntime (17368) : under Caused by: Java. Lang. NoClassDefFoundError: Class not found using the boot class loader; no stack available

The JDK version is not correct (1.8->1.7). The JDK version is not correct (1.8->1.7).


1> Installing JDK 1.7 for MAC X Yosemide requires MAC OS X10.7.3 or later

Solution reference this article: http://blog.csdn.net/daiyelang/article/details/42779645


Then there was still an error, and I was going to abolish the Java and Android environments of MAC and reconfigure them, but there was still a problem. Finally, with the help of the boss of mobile terminal, I found that the project imported Eclipse at one time and the five packages were not in the same directory.


2> After that, all the packages under the project were placed in the same level of directory and imported in sequence without any problems.