1 page.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 28 track 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), 32 CellBroadcastReceiver 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>, 35 where <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 40 warning is printed early during the build: 41 <code>/bin/bash: line 0: cd: cts/tools/cts-native-xml-generator/src/res: No 42 such 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 47 doesn't start and stays stuck on a black screen.</p> 48 <p><strong>Cause</strong>: The gingerbread branch uses version R7 of the emulator, 49 which doesn't have all the features necessary to run recent versions 50 of gingerbread.</p> 51 <p><strong>Fix</strong>: Use version R12 of the emulator, and a newer kernel that matches 52 those 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 59 and/or on XCode 4.x doesn't start.</p> 60 <p><strong>Cause</strong>: Some change in the development environment causes 61 the 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 63 MacOS 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, 66 typically 403 or 500.</p> 67 <p><strong>Cause</strong>: There are quite a few possible causes, most often 68 related to http proxies, which have difficulties handling the 69 large amounts of data getting transfered.</p> 70 <p><strong>Fix</strong>: While there's no general solution, using python 2.7 71 and explicitly using <code>repo sync -j1</code> have been reported to 72 improve 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, 75 the process hangs or fails with a variety of possible symptoms. 76 One 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 79 NAT (Network Addrss Translation) to connect the guest system to 80 the network. The heavy network activity of repo sync triggers some 81 corner 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 85 various errors related to not recognizing the hostname. One such 86 error 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 88 high 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 91 those results locally.</p> 92 <p>You can resolve them with the <code>nslookup</code> command, which will give 93 you 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 99 adding two lines in that file, of the form:</p> 100 <pre><code>aaa.bbb.ccc.ddd googlesource.com 101 eee.fff.ggg.hhh android.googlesource.com 102 </code></pre> 103 <p>Note that this will only work as long as the servers' addresses 104 don't change, and if they do and you can't connect you'll have 105 to 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 108 completed 99% of the sync.</p> 109 <p><strong>Cause</strong>: Some settings in the TCP/IP stack cause difficulties 110 in some network environments, such that <code>repo sync</code> neither completes 111 nor fails.</p> 112 <p><strong>Fix</strong>: On linux, <code>sysctl -w net.ipv4.tcp_window_scaling=0</code>. On 113 MacOS, 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) 116 on emulator builds, the resulting build doesn't work.</p> 117 <p><strong>Cause</strong>: All emulator builds now run Dex optimization at build 118 time by default, which requires to follow all dependencies to 119 re-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 122 versions with <code>make installclean</code> and run a full build to 123 re-generate non-optimized versions. After that, <code>make snod</code> 124 will 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 127 along with anti-virus warnings.</p> 128 <p><strong>Cause</strong>: Some anti-virus programs mistakenly recognize some 129 source files in the Android source tree as if they contained 130 viruses.</p> 131 <p><strong>Fix</strong>: After verifying that there are no actual viruses 132 involved, disable anti-virus on the Android tree. This has 133 the 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. 136 As an example, the Camera application crashes as soon as it's 137 launched.</p> 138 <p><strong>Cause</strong>: Those hardware peripherals require proprietary 139 libraries that aren't available in the Android Open Source 140 Project.</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 144 such 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 146 in the PATH, assuming it's a suitable compiler to generate 147 binaries that run on the host. Other situations (e.g. using 148 the Android NDK or building the kernel) cause the default 149 compiler to not be a host compiler.</p> 150 <p><strong>Fix</strong>: Use a "clean" shell, in which no previous 151 actions 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 154 complinaing about missing files or files that have the 155 wrong 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 157 and to rely on their default behaviors. Some settings change 158 those tools' behaviors and make them behave in ways that 159 confuse the build system. Variables known to cause such 160 issues are <code>CDPATH</code> and <code>GREP_OPTIONS</code>.</p> 161 <p><strong>Fix</strong>: Build Android in an environment that has as few 162 customizations 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 165 versions) 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 169 branch, 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 176 gcc to llvm, and llvm rejects code that used to be 177 accepted 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 181 versions) 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 184 is defined by default, and Android also defines that symbol, 185 which causes a conflict.</p> 186 <p><strong>Fix</strong>: Either downgrade to Ubuntu 10.04, or use the master 187 branch, 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