Home | History | Annotate | Download | only in source
      1 <!--
      2    Copyright 2010 The Android Open Source Project
      3 
      4    Licensed under the Apache License, Version 2.0 (the "License");
      5    you may not use this file except in compliance with the License.
      6    You may obtain a copy of the License at
      7 
      8        http://www.apache.org/licenses/LICENSE-2.0
      9 
     10    Unless required by applicable law or agreed to in writing, software
     11    distributed under the License is distributed on an "AS IS" BASIS,
     12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13    See the License for the specific language governing permissions and
     14    limitations under the License.
     15 -->
     16 
     17 # Known Issues #
     18 
     19 Even with our best care, small problems sometimes slip in. This page keeps
     20 track of the known issues around using the Android source code.
     21 
     22 ## Missing CTS Native XML Generator ##
     23 
     24 **Symptom**: On some builds of IceCreamSandwich and later, the following
     25 warning is printed early during the build:
     26 `/bin/bash: line 0: cd: cts/tools/cts-native-xml-generator/src/res: No
     27 such file or directory`
     28 
     29 **Cause**: Some makefile references that path, which doesn't exist.
     30 
     31 **Fix**: None. This is a harmless warning.
     32 
     33 ## Black Gingerbread Emulator ##
     34 
     35 **Symptom**: The emulator built directly from the gingerbread branch
     36 doesn't start and stays stuck on a black screen.
     37 
     38 **Cause**: The gingerbread branch uses version R7 of the emulator,
     39 which doesn't have all the features necessary to run recent versions
     40 of gingerbread.
     41 
     42 **Fix**: Use version R12 of the emulator, and a newer kernel that matches
     43 those tools. No need to do a clean build.
     44 
     45     $ repo forall platform/external/qemu -c git checkout aosp/tools_r12
     46     $ make
     47     $ emulator -kernel prebuilt/android-arm/kernel/kernel-qemu-armv7
     48 
     49 ## Emulator built on MacOS 10.7 Lion doesn't work. ##
     50 
     51 **Symptom**: The emulator (any version) built on MacOS 10.7 Lion
     52 and/or on XCode 4.x doesn't start.
     53 
     54 **Cause**: Some change in the development environment causes
     55 the emulator to be compiled in a way that prevents it from working.
     56 
     57 **Fix**: Use an emulator binary from the SDK, which is built on
     58 MacOS 10.6 with XCode 3 and works on MacOS 10.7.
     59 
     60 ## Difficulties syncing the source code (proxy issues). ##
     61 
     62 **Symptom**: `repo init` or `repo sync` fail with http errors,
     63 typically 403 or 500.
     64 
     65 **Cause**: There are quite a few possible causes, most often
     66 related to http proxies, which have difficulties handling the
     67 large amounts of data getting transfered.
     68 
     69 **Fix**: While there's no general solution, using python 2.7
     70 and explicitly using `repo sync -j1` have been reported to
     71 improve the situation for some users.
     72 
     73 ## Difficulties syncing the source tree (VirtualBox Ethernet issues). ##
     74 
     75 **Symptom**: When running `repo sync` in some VirtualBox installations,
     76 the process hangs or fails with a variety of possible symptoms.
     77 One such symptom is
     78 `DownloadError: HTTP 500 (Internal Server Error: Server got itself in trouble)`.
     79 
     80 **Cause**: The default network behavior of VirtualBox is to use
     81 NAT (Network Addrss Translation) to connect the guest system to
     82 the network. The heavy network activity of repo sync triggers some
     83 corner cases in the NAT code.
     84 
     85 **Fix**: Configure VirtualBox to use bridged network instead of NAT.
     86 
     87 ## Difficulties syncing the source tree (DNS issues). ##
     88 
     89 **Symptom**: When running `repo sync`, the process fails with
     90 various errors related to not recognizing the hostname. One such
     91 error is `<urlopen error [Errno -2] Name or service not known>`.
     92 
     93 **Cause**: Some DNS systems have a hard time coping with the
     94 high number of queries involved in syncing the source tree
     95 (there can be several hundred requests in a worst-case scenario).
     96 
     97 **Fix**: Manually resolve the relevant hostnames, and hard-code
     98 those results locally.
     99 
    100 You can resolve them with the `nslookup` command, which will give
    101 you one numerical IP address for each of those (typically in the
    102 "Address" part of the output).
    103 
    104     $ nslookup googlesource.com
    105     $ nslookup android.googlesource.com
    106 
    107 You can then hard-code them locally by editing `/etc/hosts`, and
    108 adding two lines in that file, of the form:
    109 
    110     aaa.bbb.ccc.ddd googlesource.com
    111     eee.fff.ggg.hhh android.googlesource.com
    112 
    113 Note that this will only work as long as the servers' addresses
    114 don't change, and if they do and you can't connect you'll have
    115 to resolve those hostnames again and edit `etc/hosts` accordingly.
    116 
    117 ## Difficulties syncing the source tree (TCP issues). ##
    118 
    119 **Symptom**: `repo sync` hangs while syncing, often when it's
    120 completed 99% of the sync.
    121 
    122 **Cause**: Some settings in the TCP/IP stack cause difficulties
    123 in some network environments, such that `repo sync` neither completes
    124 nor fails.
    125 
    126 **Fix**: On linux, `sysctl -w net.ipv4.tcp_window_scaling=0`. On
    127 MacOS, disable the rfc1323 extension in the network settings.
    128 
    129 ## `make snod` and emulator builds. ##
    130 
    131 **Symptom**: When using `make snod` (make system no dependencies)
    132 on emulator builds, the resulting build doesn't work.
    133 
    134 **Cause**: All emulator builds now run Dex optimization at build
    135 time by default, which requires to follow all dependencies to
    136 re-optimize the applications each time the framework changes.
    137 
    138 **Fix**: Locally disable Dex optimizations with
    139 `export WITH_DEXPREOPT=false`, delete the existing optimized
    140 versions with `make installclean` and run a full build to
    141 re-generate non-optimized versions. After that, `make snod`
    142 will work.
    143 
    144 ## "Permission Denied" during builds. ##
    145 
    146 **Symptom**: All builds fail with "Permission Denied", possibly
    147 along with anti-virus warnings.
    148 
    149 **Cause**: Some anti-virus programs mistakenly recognize some
    150 source files in the Android source tree as if they contained
    151 viruses.
    152 
    153 **Fix**: After verifying that there are no actual viruses
    154 involved, disable anti-virus on the Android tree. This has
    155 the added benefit of reducing build times.
    156 
    157 ## Camera, GPS and NFC don't work on Galaxy Nexus. ##
    158 
    159 **Symptom**: Camera, GPS and NFC don't work on Galaxy Nexus.
    160 As an example, the Camera application crashes as soon as it's
    161 launched.
    162 
    163 **Cause**: Those hardware peripherals require proprietary
    164 libraries that aren't available in the Android Open Source
    165 Project.
    166 
    167 **Fix**: None.
    168 
    169 ## Build errors related to using the wrong compiler. ##
    170 
    171 **Symptom**: The build fails with various symptoms. One
    172 such symptom is `cc1: error: unrecognized command line option "-m32"`
    173 
    174 **Cause**: The Android build system uses the default compiler
    175 in the PATH, assuming it's a suitable compiler to generate
    176 binaries that run on the host. Other situations (e.g. using
    177 the Android NDK or building the kernel) cause the default
    178 compiler to not be a host compiler.
    179 
    180 **Fix**: Use a "clean" shell, in which no previous
    181 actions could have swapped the default compiler.
    182 
    183 ## Build errors caused by non-default tool settings. ##
    184 
    185 **Symptom**: The build fails with various symptoms, possibly
    186 complinaing about missing files or files that have the
    187 wrong format. One such symptom is `member [...] in archive is not an object`.
    188 
    189 **Cause**: The Android build system tends to use many host tools
    190 and to rely on their default behaviors. Some settings change
    191 those tools' behaviors and make them behave in ways that
    192 confuse the build system. Variables known to cause such
    193 issues are `CDPATH` and `GREP_OPTIONS`.
    194 
    195 **Fix**: Build Android in an environment that has as few
    196 customizations as possible.
    197