问题与aapt.exe [英] Issue with aapt.exe

查看:150
本文介绍了问题与aapt.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是最新版本的ADT捆绑的Andr​​oid开发者网站下载。我在Windows 7上我的R.java文件是不正确编译由于这样的事实,我得到从Windows以下崩溃的消息:

I'm using the latest version of the ADT Bundle downloaded on the android developers site. I'm on Windows 7. My R.java file is not compiling correctly due to the fact that I get the following crash message from Windows:

下面是问题的详细信息输出:

Here is the problem details output:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: aapt.exe
  Application Version:  0.0.0.0
  Application Timestamp:    52684cb5
  Fault Module Name:    aapt.exe
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   52684cb5
  Exception Code:   c0000005
  Exception Offset: 0003cf2a
  OS Version:   6.1.7601.2.1.0.256.1
  Locale ID:    1033
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

现在正因为如此,我的R.java文件不断消失,下面的问题显示出来:

Now because of this, my R.java file keeps disappearing and the following problems show up:

注意到第一问题清单上

现在我已经通过下面的步骤去了约10倍:

Now I've went through the following steps about 10 times:

1. Uncheck build automatically
2. Clean project,
3. Check build config
4. Rebuild project

如果你去说做任何这是一个解决方案,那么就不要发布解决方案,因为我不打算做一些事情,我已经做了十亿倍。

If your going to say to do any of this as a solution then don't post a solution because I'm not going to do something I've already done a billion times.

我从它的所有的错误的Andr​​oid移植工作室这个项目了,在我与Eclipse的经验,我从来没有见过这种aapt.exe错误。什么是aapt.exe,什么是它的目的是什么?

I ported this project over from Android Studio from all its errors and, in my experience with Eclipse, I've never seen this aapt.exe error. What is aapt.exe and what's its purpose?

任何帮助是极大AP preciated。

Any help is greatly appreciated.

安德鲁

推荐答案

我要感谢你们提供的所有帮助。约2小时比较与文件的文件和大约50谷歌搜索后,我固定它。

I would like to thank you for all the help provided. After about 2 hours of comparing files with files and about 50 Google searches, I fixed it.

事实证明,我的菜单的XML文件名为main_menu.xml有code的一个额外的行并不需要在那里。请参见下面code和阅读评论:

It turns out that my menu xml file named main_menu.xml had an extra line of code that didn't need to be there. See code below and read comment:

<!-- This top line is the problem -->
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

    <item
        android:id="@id/action_about"
        android:icon="@drawable/action_about"
        android:orderInCategory="1"
        android:title="@string/action_about"/>
    <item
        android:id="@id/action_settings"
        android:orderInCategory="100"
        android:title="@string/action_settings"/>

</menu>

现在以下code是固定我的R.java文件生成故障解决方法:

Now the following code is the solution that fixed my R.java file generation failure:

<!-- The xml version/encoding line is gone and everything is working fine now -->
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

    <item
        android:id="@+id/action_about"
        android:icon="@drawable/action_about"
        android:orderInCategory="1"
        android:showAsAction="always"
        android:title="@string/action_about"/>
    <item
        android:id="@+id/action_settings"
        android:orderInCategory="2"
        android:showAsAction="never"
        android:title="@string/action_settings"/>

</menu>

所以,现在一切都很正常!

So now everything works great!

再次感谢所有帮助!

这篇关于问题与aapt.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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