Home » Android » frameworks – Missing symbols building Android on Ubuntu

frameworks – Missing symbols building Android on Ubuntu

Posted by: admin June 15, 2020 Leave a comment

Questions:

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

cat /proc/version

says

Linux version 2.6.38-8-generic ([email protected]) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu3) ) #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011

I have synchronized everything by using:

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

and I chose the full-engineering target by using:

lunch full-eng

This is a partial list of the errors 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/
How to&Answers:

Below is what removed these errors in my case. An offending extraneous ‘/’ at the end.

bad:

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

Answer:

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) might be different for folks as it depends on the version on jdk you have installed. Just use the jdk folder you have installed. The path to bin is the same.

Answer:

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

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

Answer:

The following was my fix in OSX. You have to see what JVMs you have and set it appropriately.

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

Answer:

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

Answer:

I ran into this too, and the issue was that I was missing some Ubuntu packages. Once I followed the instructions in http://source.android.com/source/initializing.html to install the packages, things worked fine.
It’s confusing since the error is in Java, but the problem is in the OS.

Answer:

Finally I Finished My Project with AOPS

There is a error about [doclava] that up mentioned

I check a lot information than I ADD the

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

Good Luck…