Android源代码构建问题 [英] Android Source code build problem

查看:75
本文介绍了Android源代码构建问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在逐步构建Android源代码.按照说明进行所有设置后,我执行了"make".生成过程一直持续到链接最终失败并出现以下错误:

I've been going through the steps to build the Android Source code. After getting everything set up according to the instructions, I executed "make". The make process chugged along until the link where it ultimately failed with the following error:

Undefined symbols for architecture x86_64:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

另外要注意的是,该链接正在生成许多与此类似的警告:

The other thing of note is that the link is generating a number of warning similar to this:

ld:警告:忽略文件 out/host/darwin-x86/obj/EXECUTABLES/emulator_intermediates/android/hw-kmsg.o, 文件是为i386构建的,不是 链接的架构(x86_64)

ld: warning: ignoring file out/host/darwin-x86/obj/EXECUTABLES/emulator_intermediates/android/hw-kmsg.o, file was built for i386 which is not the architecture being linked (x86_64)

有人可以帮我解决这个问题吗?

Can anyone help me with the solution to this?

谢谢, 克雷格

推荐答案

感谢dljava.是的,Xcode 4.x是一个问题,但不是我发现的唯一问题.抱歉,我没有回来并且更早发布了我的一些发现.我被别的东西锁定了.

Thanks dljava. Yes, Xcode 4.x is a problem, but not the only problem that I've found. I'm sorry I didn't come back and post some of my findings earlier. I've been locked down on something else.

正式地,仅Leopard才支持Android源构建,而Snow Leopard则不支持.到处搜寻,您会发现许多关于此事以及人们如何解决它的文章.该解决方案通常涉及更改各种生成文件和其他设置.关于这些解决方案的一件事是,许多解决方案已经过时并且不再起作用.一些作者更新了他们的说明,而另一些则没有.

Officially, the Android source build is only supported on Leopard, not Snow Leopard. Googling around you can find a number of posts about this and how people have gotten around it. The solution typically involved changing various makefiles and other settings. The one thing about those solutions are that many have become stale and no longer work. Some authors have updated their instructions, while others have not.

此外,最新的Xcode也被证明是有问题的.总的来说,我试图用Snow Leopard和最新的XCode来在我的iOS开发机器上构建Android源码,这就像是一场永无止境的令人沮丧的w鼠游戏.

Additionally, the latest Xcode proved problematic as well. In general, my attempts to get the Android source built on my iOS dev machine with Snow Leopard and the latest XCode was like a never-ending frustrating game of whack-a-mole.

我的解决方案是简单地使用Mac mini,该Mac mini目前还没有被用作Android源开发盒.我在上面干净安装了Leopard.我安装了支持Leopard的最新版本的iPhone SDK + XCode.我认为那是针对iOS 3.1.3的.然后按照Android开发人员网站上的说明构建源代码之后,我就成功了.

My solution was simply to use a Mac mini that wasn't being used at the moment as an Android source dev box. I did a clean install of Leopard on it. I installed the last version of the iPhone SDK + XCode that supported Leopard. I think that was for iOS 3.1.3. Then after following the instructions on the Android dev site for building the source, I was successful.

因此,我建议您使用单独的包装盒进行操作,或者建议您是否可以在包装盒上创建可启动分区并在其上安装Leopard.这似乎是使大脑损伤最小的方法.

So I would suggest either what I did with a separate box, or if you are able to create a bootable partition on your box and install Leopard on it. That seems to be the way to do it with the least brain damage.

祝你好运

克雷格

这篇关于Android源代码构建问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆