Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing symbols building Android on Ubuntu

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 (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 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/
like image 504
kingston Avatar asked Jan 08 '12 19:01

kingston


2 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
like image 157
rob Avatar answered Nov 13 '22 05:11

rob


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.

like image 45
Sid Sarasvati Avatar answered Nov 13 '22 04:11

Sid Sarasvati