最近同步了android 4.2.2_r1版的源码,想编译sdk。
编译了几个小时后,突然出现关于javadoc的错误: Docs droiddoc: out/target/common/docs/doc-comment-check DroidDoc took 215 sec. to write docs to out/target/common/docs/doc-comment-check Docs droiddoc: out/target/common/docs/online-sdk DroidDoc took 170 sec. to write docs to out/target/common/docs/online-sdk Docs droiddoc: out/target/common/docs/ds DroidDoc took 147 sec. to write docs to out/target/common/docs/ds Docs droiddoc: out/target/common/docs/online-gcm-ref javadoc: error - No packages or classes specified. usage: javadoc [options] [packagenames] [sourcefiles] [@files] -overview <file> Read overview documentation from HTML file -public Show only public classes and members -protected Show protected/public classes and members (default) -package Show package/protected/public classes and members -private Show all classes and members -help Display command line options and exit -doclet <class> Generate output via alternate doclet -docletpath <path> Specify where to find doclet class files -sourcepath <pathlist> Specify where to find source files -classpath <pathlist> Specify where to find user class files -exclude <pkglist> Specify a list of packages to exclude -subpackages <subpkglist> Specify subpackages to recursively load -breakiterator Compute 1st sentence with BreakIterator -bootclasspath <pathlist> Override location of class files loaded by the bootstrap class loader -source <release> Provide source compatibility with specified release -extdirs <dirlist> Override location of installed extensions -verbose Output messages about what Javadoc is doing -locale <name> Locale to be used, e.g. en_US or en_US_WIN -encoding <name> Source file encoding name -quiet Do not display status messages -J<flag> Pass <flag> directly to the runtime system 1 error make: *** [out/target/common/docs/online-gcm-ref-timestamp] Error 45解决办法:
在SOURCE_ROOT/frameworks/base目录下,使用git revert 5f9922d7c3bce158e4c7a58929d4075e7c91e32e 命令同步到另一个没有错的版本。 git revert 5f9922d7c3bce158e4c7a58929d4075e7c91e32e error: Your local changes to 'Android.mk' would be overwritten by merge. Aborting. Please, commit your changes or stash them before you can merge. 解决办法:重命名Android.mk,就不会出现overwrite的error了.