1、在JDK7 下面执行会出现问题,因为JDK7并未包含在Android环境之内
The Dalvik virtual machine equivalent of Utils.class was not stored in classes.dex, and an attempt to reference this class (at startup) has resulted in a thrown instance of the Dalvik equivalent of the java.lang.NoClassDefFoundError class. You can further prove this cause to yourself by executing the following command from within the bin directory:
dexdump classes.dex
The classes.dex file contains Android's Dalvik equivalent of the project's compiled Java classfiles. The dexdump tool processes this file and generates a disassembly. Search this disassembly and you'll not find a reference to the Utils class, because this JDK 7-created class is not present.
To fix this problem, include the -source and -target options when compiling the source code via javac, as follows:
javac -source 1.5 -target 1.5 ca/tutortutor/utils/Utils.java
javac -source 1.6 -target 1.6 ca/tutortutor/utils/Utils.java