blob: 076e49940e2512c4d409e851e5e900551f65c2a5 [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 Queru30dee1c2013-03-11 11:02:45 -070022## Missing CellBroadcastReceiver in toro builds ##
23
24**Symptom**: On AOSP builds for toro (up to Jelly Bean 4.2.1),
25CellBroadcastReceiver doesn't get included in the system.
26
27**Cause**: There's a typo in vendor/samsung/toro/device-partial.mk,
28where PRODUCT_PACKAGES has the K replaced by an H.
29
30**Fix**: Use the latest packages for 4.2.2, or manually fix the typo.
31
Jean-Baptiste Querudc6e9ca2012-01-05 08:06:08 -080032## Missing CTS Native XML Generator ##
33
34**Symptom**: On some builds of IceCreamSandwich and later, the following
35warning is printed early during the build:
36`/bin/bash: line 0: cd: cts/tools/cts-native-xml-generator/src/res: No
37such file or directory`
38
39**Cause**: Some makefile references that path, which doesn't exist.
40
41**Fix**: None. This is a harmless warning.
42
Jean-Baptiste Queru4c07af92011-06-22 16:41:01 -070043## Black Gingerbread Emulator ##
44
45**Symptom**: The emulator built directly from the gingerbread branch
46doesn't start and stays stuck on a black screen.
47
48**Cause**: The gingerbread branch uses version R7 of the emulator,
49which doesn't have all the features necessary to run recent versions
50of gingerbread.
51
52**Fix**: Use version R12 of the emulator, and a newer kernel that matches
53those tools. No need to do a clean build.
54
Jean-Baptiste Queru015de9c2012-04-03 08:01:11 -070055 $ repo forall platform/external/qemu -c git checkout aosp/tools_r12
Jean-Baptiste Queru4c07af92011-06-22 16:41:01 -070056 $ make
57 $ emulator -kernel prebuilt/android-arm/kernel/kernel-qemu-armv7
Jean-Baptiste Queru015de9c2012-04-03 08:01:11 -070058
59## Emulator built on MacOS 10.7 Lion doesn't work. ##
60
61**Symptom**: The emulator (any version) built on MacOS 10.7 Lion
62and/or on XCode 4.x doesn't start.
63
64**Cause**: Some change in the development environment causes
65the emulator to be compiled in a way that prevents it from working.
66
67**Fix**: Use an emulator binary from the SDK, which is built on
68MacOS 10.6 with XCode 3 and works on MacOS 10.7.
Jean-Baptiste Querudfce7fc2012-04-19 15:16:05 -070069
70## Difficulties syncing the source code (proxy issues). ##
71
72**Symptom**: `repo init` or `repo sync` fail with http errors,
73typically 403 or 500.
74
75**Cause**: There are quite a few possible causes, most often
76related to http proxies, which have difficulties handling the
77large amounts of data getting transfered.
78
79**Fix**: While there's no general solution, using python 2.7
80and explicitly using `repo sync -j1` have been reported to
81improve the situation for some users.
Jean-Baptiste Queru8eef6f42012-04-19 15:28:26 -070082
Jean-Baptiste Queruc97e8852012-04-19 16:18:11 -070083## Difficulties syncing the source tree (VirtualBox Ethernet issues). ##
84
85**Symptom**: When running `repo sync` in some VirtualBox installations,
86the process hangs or fails with a variety of possible symptoms.
87One such symptom is
88`DownloadError: HTTP 500 (Internal Server Error: Server got itself in trouble)`.
89
90**Cause**: The default network behavior of VirtualBox is to use
91NAT (Network Addrss Translation) to connect the guest system to
92the network. The heavy network activity of repo sync triggers some
93corner cases in the NAT code.
94
95**Fix**: Configure VirtualBox to use bridged network instead of NAT.
96
Jean-Baptiste Queru6c032a92012-04-19 16:38:28 -070097## Difficulties syncing the source tree (DNS issues). ##
98
99**Symptom**: When running `repo sync`, the process fails with
100various errors related to not recognizing the hostname. One such
101error is `<urlopen error [Errno -2] Name or service not known>`.
102
103**Cause**: Some DNS systems have a hard time coping with the
104high number of queries involved in syncing the source tree
105(there can be several hundred requests in a worst-case scenario).
106
107**Fix**: Manually resolve the relevant hostnames, and hard-code
108those results locally.
109
110You can resolve them with the `nslookup` command, which will give
111you one numerical IP address for each of those (typically in the
112"Address" part of the output).
113
114 $ nslookup googlesource.com
115 $ nslookup android.googlesource.com
116
117You can then hard-code them locally by editing `/etc/hosts`, and
118adding two lines in that file, of the form:
119
120 aaa.bbb.ccc.ddd googlesource.com
121 eee.fff.ggg.hhh android.googlesource.com
122
123Note that this will only work as long as the servers' addresses
124don't change, and if they do and you can't connect you'll have
125to resolve those hostnames again and edit `etc/hosts` accordingly.
126
Jean-Baptiste Queruf1694d32012-04-19 16:41:15 -0700127## Difficulties syncing the source tree (TCP issues). ##
128
129**Symptom**: `repo sync` hangs while syncing, often when it's
130completed 99% of the sync.
131
132**Cause**: Some settings in the TCP/IP stack cause difficulties
133in some network environments, such that `repo sync` neither completes
134nor fails.
135
136**Fix**: On linux, `sysctl -w net.ipv4.tcp_window_scaling=0`. On
137MacOS, disable the rfc1323 extension in the network settings.
138
Jean-Baptiste Queru8eef6f42012-04-19 15:28:26 -0700139## `make snod` and emulator builds. ##
140
141**Symptom**: When using `make snod` (make system no dependencies)
142on emulator builds, the resulting build doesn't work.
143
144**Cause**: All emulator builds now run Dex optimization at build
145time by default, which requires to follow all dependencies to
146re-optimize the applications each time the framework changes.
147
148**Fix**: Locally disable Dex optimizations with
149`export WITH_DEXPREOPT=false`, delete the existing optimized
150versions with `make installclean` and run a full build to
151re-generate non-optimized versions. After that, `make snod`
152will work.
Jean-Baptiste Queru7d2ff822012-04-19 15:37:04 -0700153
154## "Permission Denied" during builds. ##
155
156**Symptom**: All builds fail with "Permission Denied", possibly
157along with anti-virus warnings.
158
159**Cause**: Some anti-virus programs mistakenly recognize some
160source files in the Android source tree as if they contained
161viruses.
162
163**Fix**: After verifying that there are no actual viruses
164involved, disable anti-virus on the Android tree. This has
165the added benefit of reducing build times.
Jean-Baptiste Querub176fae2012-04-19 15:42:44 -0700166
Jean-Baptiste Queru8b726cf2012-11-26 09:14:18 -0800167## Camera and GPS don't work on Galaxy Nexus. ##
Jean-Baptiste Querub176fae2012-04-19 15:42:44 -0700168
Jean-Baptiste Queru8b726cf2012-11-26 09:14:18 -0800169**Symptom**: Camera and GPS don't work on Galaxy Nexus.
Jean-Baptiste Querub176fae2012-04-19 15:42:44 -0700170As an example, the Camera application crashes as soon as it's
171launched.
172
173**Cause**: Those hardware peripherals require proprietary
174libraries that aren't available in the Android Open Source
175Project.
176
177**Fix**: None.
Jean-Baptiste Queru51489a62012-04-19 15:58:25 -0700178
179## Build errors related to using the wrong compiler. ##
180
181**Symptom**: The build fails with various symptoms. One
182such symptom is `cc1: error: unrecognized command line option "-m32"`
183
184**Cause**: The Android build system uses the default compiler
185in the PATH, assuming it's a suitable compiler to generate
186binaries that run on the host. Other situations (e.g. using
187the Android NDK or building the kernel) cause the default
188compiler to not be a host compiler.
189
190**Fix**: Use a "clean" shell, in which no previous
191actions could have swapped the default compiler.
Jean-Baptiste Queru50fc5ad2012-04-19 15:59:39 -0700192
193## Build errors caused by non-default tool settings. ##
194
195**Symptom**: The build fails with various symptoms, possibly
196complinaing about missing files or files that have the
197wrong format. One such symptom is `member [...] in archive is not an object`.
198
199**Cause**: The Android build system tends to use many host tools
200and to rely on their default behaviors. Some settings change
201those tools' behaviors and make them behave in ways that
202confuse the build system. Variables known to cause such
203issues are `CDPATH` and `GREP_OPTIONS`.
204
205**Fix**: Build Android in an environment that has as few
206customizations as possible.
Jean-Baptiste Queru6e2c9d22012-04-19 17:35:36 -0700207
208## Build error with 4.0.x and earlier on MacOS 10.7. ##
209
210**Symptom**: Building IceCreamSandwich 4.0.x (and older
211versions) fails on MacOS 10.7 with errors similar to this:
212`Undefined symbols for architecture i386: "_SDL_Init"`
213
214**Cause**: 4.0.x is not compatible with MacOS 10.7.
215
216**Fix**: Either downgrade to MacOS 10.6, or use the master
217branch, which can be built on MacOS 10.7.
218
219 $ repo init -b master
220 $ repo sync
Jean-Baptiste Querud0aecc82012-04-19 17:38:18 -0700221
222## Build error on MacOS with XCode 4.3. ##
223
224**Symptom**: All builds fail when using XCode 4.3.
225
226**Cause**: XCode 4.3 switched the default compiler from
227gcc to llvm, and llvm rejects code that used to be
228accepted by gcc.
229
230**Fix**: Use XCode 4.2.
Jean-Baptiste Queru962a6fe2012-04-19 17:41:46 -0700231
232## Build error with 4.0.x and earlier on Ubuntu 11.10. ##
233
234**Symptom**: Building IceCreamSandwich 4.0.x (and older
235versions) on Ubuntu 11.10 and newer fails with errors similar to this:
236`<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]`
237
238**Cause**: Ubuntu 11.10 uses a version of gcc where that symbol
239is defined by default, and Android also defines that symbol,
240which causes a conflict.
241
242**Fix**: Either downgrade to Ubuntu 10.04, or use the master
243branch, which can be compiled on Ubuntu 11.10 and newer.
244
245 $ repo init -b master
246 $ repo sync