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

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

问题描述

我正在使用Android开发者网站上下载的最新版本的ADT Bundle。我在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:


记下该列表中的第一个问题

Take note of the first problem on that list

现在我已经完成了以下步骤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.

我从Android Studio从所有错误中移植了这个项目,根据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?

非常感谢任何帮助。

Andrew

推荐答案

感谢您提供的所有帮助。大约2个小时比较文件与文件和大约50个Google搜索,我修正了。

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有一个额外的行的代码,不需要在那里。请参阅以下代码并阅读评论:

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>

现在以下代码是解决了我的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>

所以现在一切都很好!

再次感谢所有的帮助!

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

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