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