Missing characters creating Android on Ubuntu

I followed the source.android.com instructions to create the Android framework, but when I run the make command I get a lot of errors. I am running virtualized 32-bit Ubuntu 11.04 on vmware under 64-bit Windows Vista.

cat /proc/version

He speaks

Linux version 2.6.38-8-generic (buildd@vernadsky) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu3) ) #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011

I synchronized everything using:

 repo init -u https://android.googlesource.com/platform/manifest repo sync 

and I chose the goal of full engineering using:

 lunch full-eng 

This is an incomplete list of errors that I get:

 PLATFORM_VERSION_CODENAME=AOSP PLATFORM_VERSION=4.0.3.0.2.0.1.0 TARGET_PRODUCT=full TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=OPENMASTER OUT_DIR=out /bin/bash: line 0: cd: cts/tools/cts-native-xml-generator/src/res: No such file or directory host Java: doclava (out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes) external/doclava/src/com/google/doclava/ClassInfo.java:20: package com.sun.javadoc does not exist import com.sun.javadoc.ClassDoc; ^ external/doclava/src/com/google/doclava/ClassInfo.java:62: cannot find symbol symbol : class ClassDoc location: class com.google.doclava.ClassInfo public ClassInfo(ClassDoc cl, String rawCommentText, SourcePositionInfo position, ^ external/doclava/src/com/google/doclava/PackageInfo.java:21: package com.sun.javadoc does not exist import com.sun.javadoc.*; ^ external/doclava/src/com/google/doclava/ClassInfo.java:1406: cannot find symbol symbol : class ClassDoc location: class com.google.doclava.ClassInfo private ClassDoc mClass; ^ external/doclava/src/com/google/doclava/PackageInfo.java:33: cannot find symbol symbol : class PackageDoc location: class com.google.doclava.PackageInfo public PackageInfo(PackageDoc pkg, String name, SourcePositionInfo position) { ^ external/doclava/src/com/google/doclava/PackageInfo.java:185: cannot find symbol symbol : class PackageDoc location: class com.google.doclava.PackageInfo private PackageDoc mPackage; ^ external/doclava/src/com/google/doclava/apicheck/XmlApiFile.java:28: package com.sun.javadoc does not exist import com.sun.javadoc.ClassDoc; ^ external/doclava/src/com/google/doclava/Converter.java:19: package com.sun.javadoc does not exist import com.sun.javadoc.*; ^ external/doclava/ 
+8
android frameworks build android-source
source share
7 answers

Below is what removed these errors in my case. Violation of an extraneous "/" at the end.

badly:

 export PATH=/home/rev/BIN/jdk-6u34/jdk1.6.0_34/bin/:$PATH 

Good:

 export PATH=/home/rev/BIN/jdk-6u34/jdk1.6.0_34/bin:$PATH 
+27
source share

To fix this on OSX, add the Java bin directory to PATH

export PATH = / Library / Java / JavaVirtualMachines / jdk1.7.0_51.jdk / Contents / Home / bin: $ PATH

PS: the jdk folder (jdk.1.7.0_51.jdk) may be different for people, as it depends on the version on the jdk you installed. Just use the jdk folder you installed. The path to the basket is the same.

+9
source share

Another reason for this error is that you are using something like jenv to manage multiple Java environments. Android build tools by default look for tools.jar relative to the location of the javac binary. If you use jenv (or any other tool that captures javac), this will not work.

However, you can set the ANDROID_JAVA_HOME environment variable to point to your "real" JDK, in which case the build tools will look in $ ANDROID_JAVA_HOME / lib / tools.jar.

+5
source share

The following was my fix on OSX. You should see what kind of JVM you have and install it accordingly.

 export ANDROID_JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home 
+1
source share

It is recommended that you create Android sources using 64-bit Ubuntu Linux. But I do not think this is a problem in your case. It seems to me that the problem is in the JDK. Have you installed the JDK 6 version on your computer?

0
source share

I ran into this too, and the problem was that I was missing some Ubuntu packages. As soon as I followed the instructions in http://source.android.com/source/initializing.html to install the packages, everything went fine. This is confusing since the error is in Java, but the problem is in the OS.

0
source share

Finally, I finished my project with AOPS

In [doclava] there is an error mentioned above

I check a lot of information than I ADD

export ANDROID_JAVA_HOME = / Library / Java / JavaVirtualMachines / jdk1.7.0_80.jdk / Contents / Home

Good luck ...

0
source share

All Articles