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