blob: 46c52c065bff1c3c08440c7bfb5486c9c561381b [file] [log] [blame] [view]
Jean-Baptiste Queru4c07af92011-06-22 16:41:01 -07001<!--
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
19Even with our best care, small problems sometimes slip in. This page keeps
20track of the known issues around using the Android source code.
21
Jean-Baptiste Querudc6e9ca2012-01-05 08:06:08 -080022## Missing CTS Native XML Generator ##
23
24**Symptom**: On some builds of IceCreamSandwich and later, the following
25warning is printed early during the build:
26`/bin/bash: line 0: cd: cts/tools/cts-native-xml-generator/src/res: No
27such 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
Jean-Baptiste Queru4c07af92011-06-22 16:41:01 -070033## Black Gingerbread Emulator ##
34
35**Symptom**: The emulator built directly from the gingerbread branch
36doesn't start and stays stuck on a black screen.
37
38**Cause**: The gingerbread branch uses version R7 of the emulator,
39which doesn't have all the features necessary to run recent versions
40of gingerbread.
41
42**Fix**: Use version R12 of the emulator, and a newer kernel that matches
43those tools. No need to do a clean build.
44
Jean-Baptiste Queru015de9c2012-04-03 08:01:11 -070045 $ repo forall platform/external/qemu -c git checkout aosp/tools_r12
Jean-Baptiste Queru4c07af92011-06-22 16:41:01 -070046 $ make
47 $ emulator -kernel prebuilt/android-arm/kernel/kernel-qemu-armv7
Jean-Baptiste Queru015de9c2012-04-03 08:01:11 -070048
49## Emulator built on MacOS 10.7 Lion doesn't work. ##
50
51**Symptom**: The emulator (any version) built on MacOS 10.7 Lion
52and/or on XCode 4.x doesn't start.
53
54**Cause**: Some change in the development environment causes
55the 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
58MacOS 10.6 with XCode 3 and works on MacOS 10.7.
Jean-Baptiste Querudfce7fc2012-04-19 15:16:05 -070059
60## Difficulties syncing the source code (proxy issues). ##
61
62**Symptom**: `repo init` or `repo sync` fail with http errors,
63typically 403 or 500.
64
65**Cause**: There are quite a few possible causes, most often
66related to http proxies, which have difficulties handling the
67large amounts of data getting transfered.
68
69**Fix**: While there's no general solution, using python 2.7
70and explicitly using `repo sync -j1` have been reported to
71improve the situation for some users.
Jean-Baptiste Queru8eef6f42012-04-19 15:28:26 -070072
Jean-Baptiste Queruc97e8852012-04-19 16:18:11 -070073## Difficulties syncing the source tree (VirtualBox Ethernet issues). ##
74
75**Symptom**: When running `repo sync` in some VirtualBox installations,
76the process hangs or fails with a variety of possible symptoms.
77One 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
81NAT (Network Addrss Translation) to connect the guest system to
82the network. The heavy network activity of repo sync triggers some
83corner cases in the NAT code.
84
85**Fix**: Configure VirtualBox to use bridged network instead of NAT.
86
Jean-Baptiste Queru6c032a92012-04-19 16:38:28 -070087## Difficulties syncing the source tree (DNS issues). ##
88
89**Symptom**: When running `repo sync`, the process fails with
90various errors related to not recognizing the hostname. One such
91error is `<urlopen error [Errno -2] Name or service not known>`.
92
93**Cause**: Some DNS systems have a hard time coping with the
94high 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
98those results locally.
99
100You can resolve them with the `nslookup` command, which will give
101you 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
107You can then hard-code them locally by editing `/etc/hosts`, and
108adding 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
113Note that this will only work as long as the servers' addresses
114don't change, and if they do and you can't connect you'll have
115to resolve those hostnames again and edit `etc/hosts` accordingly.
116
Jean-Baptiste Queruf1694d32012-04-19 16:41:15 -0700117## Difficulties syncing the source tree (TCP issues). ##
118
119**Symptom**: `repo sync` hangs while syncing, often when it's
120completed 99% of the sync.
121
122**Cause**: Some settings in the TCP/IP stack cause difficulties
123in some network environments, such that `repo sync` neither completes
124nor fails.
125
126**Fix**: On linux, `sysctl -w net.ipv4.tcp_window_scaling=0`. On
127MacOS, disable the rfc1323 extension in the network settings.
128
Jean-Baptiste Queru8eef6f42012-04-19 15:28:26 -0700129## `make snod` and emulator builds. ##
130
131**Symptom**: When using `make snod` (make system no dependencies)
132on emulator builds, the resulting build doesn't work.
133
134**Cause**: All emulator builds now run Dex optimization at build
135time by default, which requires to follow all dependencies to
136re-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
140versions with `make installclean` and run a full build to
141re-generate non-optimized versions. After that, `make snod`
142will work.
Jean-Baptiste Queru7d2ff822012-04-19 15:37:04 -0700143
144## "Permission Denied" during builds. ##
145
146**Symptom**: All builds fail with "Permission Denied", possibly
147along with anti-virus warnings.
148
149**Cause**: Some anti-virus programs mistakenly recognize some
150source files in the Android source tree as if they contained
151viruses.
152
153**Fix**: After verifying that there are no actual viruses
154involved, disable anti-virus on the Android tree. This has
155the added benefit of reducing build times.
Jean-Baptiste Querub176fae2012-04-19 15:42:44 -0700156
157## Camera, GPS and NFC don't work on Galaxy Nexus. ##
158
159**Symptom**: Camera, GPS and NFC don't work on Galaxy Nexus.
160As an example, the Camera application crashes as soon as it's
161launched.
162
163**Cause**: Those hardware peripherals require proprietary
164libraries that aren't available in the Android Open Source
165Project.
166
167**Fix**: None.
Jean-Baptiste Queru51489a62012-04-19 15:58:25 -0700168
169## Build errors related to using the wrong compiler. ##
170
171**Symptom**: The build fails with various symptoms. One
172such symptom is `cc1: error: unrecognized command line option "-m32"`
173
174**Cause**: The Android build system uses the default compiler
175in the PATH, assuming it's a suitable compiler to generate
176binaries that run on the host. Other situations (e.g. using
177the Android NDK or building the kernel) cause the default
178compiler to not be a host compiler.
179
180**Fix**: Use a "clean" shell, in which no previous
181actions could have swapped the default compiler.
Jean-Baptiste Queru50fc5ad2012-04-19 15:59:39 -0700182
183## Build errors caused by non-default tool settings. ##
184
185**Symptom**: The build fails with various symptoms, possibly
186complinaing about missing files or files that have the
187wrong 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
190and to rely on their default behaviors. Some settings change
191those tools' behaviors and make them behave in ways that
192confuse the build system. Variables known to cause such
193issues are `CDPATH` and `GREP_OPTIONS`.
194
195**Fix**: Build Android in an environment that has as few
196customizations as possible.
Jean-Baptiste Queru6e2c9d22012-04-19 17:35:36 -0700197
198## Build error with 4.0.x and earlier on MacOS 10.7. ##
199
200**Symptom**: Building IceCreamSandwich 4.0.x (and older
201versions) fails on MacOS 10.7 with errors similar to this:
202`Undefined symbols for architecture i386: "_SDL_Init"`
203
204**Cause**: 4.0.x is not compatible with MacOS 10.7.
205
206**Fix**: Either downgrade to MacOS 10.6, or use the master
207branch, which can be built on MacOS 10.7.
208
209 $ repo init -b master
210 $ repo sync