“AAPT”的错误。 pre编译器生成中止 [英] 'aapt' error. Pre Compiler Build aborted

查看:192
本文介绍了“AAPT”的错误。 pre编译器生成中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的Eclipse 4.2.2与Android SDK 22.0.1构建一个Android应用程序,它使用了Facebook和谷歌播放服务库。但是我坚持着一个问题:每次我有一个或两个库的AAPT详细模式的崩溃在某些时候像这样(我想这也崩溃,并详细模式关闭,因为R.java文件没有创建于我的项目):

I'm using Eclipse 4.2.2 with Android SDK 22.0.1 to construct an Android application which uses the Facebook and Google Play Services lib. However I'm stuck with a problem: every time I include one or both of the library the aapt verbose mode crash in some point like this (I assume this also crash with verbose mode off, because the R.java files are not created on my project):

[2013-06-21 01:33:40 - Project]     (new resource id com_facebook_placepickerfragment_list_row from /Users/Solens/workspace/FacebookSDK/res/layout/com_facebook_placepickerfragment_list_row.xml)
[2013-06-21 01:33:41 - Project]     (new resource id com_facebook_us
[2013-06-21 01:33:41 - Project] 'aapt' error. Pre Compiler Build aborted.

如果我不包括库项目正确编译。我已经尝试了几种解决方案,如清洁 - >构建项目,试图更新SDK工具(但我使用的是最新版本),但是任何人都工作过。我甚至尝试切换操作系统到Windows 7(我用的山狮),并同样的问题出现了。

If I don't include the libraries the project compile correctly. I've tried several solutions like clean -> build project, trying to update the sdk tools (however I'm using the lastest revision), but any of them have worked. I even tried switching OS to Windows 7 (I use Mountain Lion) and the same problems arise.

有趣的是我有两个库增加了一个项目,唯一不同的是另一个项目了,到目前为止,更少的资源比我坠毁的项目。

The funny thing is I have another project which both of the libraries added, the only difference is this other project has, by far, less resources than my crashed project.

我已经被困在这个问题上两个星期,仍然没有找到一个解决方案。

I've been stuck on this problem by two weeks and still not found a solution.

在此先感谢。

PS:相关的问题 - > AAPT误差修改生成的资源,当IDS

P.S.: related question -> aapt erros when generating resource ids

推荐答案

我收到了同样的错误,并尝试使用旧的Andr​​oid编译工具@Onko建议在第二点意见解决这个问题。而Android构建工具V19将不会报告在资源文件中的错误。

I'm getting the same error, and try using the older android build tools as @Onko suggest in the second comment solve the problem. The android build tool v19 won't report the error in your resource files.

所以,我所做的就是,重新下载的SDK管理器中内建的工具V18并删除v19.0.1然后重新启动Eclipse和清洁力日食重建项目。从那以后,我发现什么是我的资源XML文件中的错误。

So what I did was, re-download the Build-tools v18 in SDK Manager and delete the v19.0.1 then restart the eclipse and clean and force eclipse to rebuild the project. After that I found what is the error in my resource xml file.

这篇关于“AAPT”的错误。 pre编译器生成中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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