今天在做android项目时,加入第三方包,一编译就报错。
错误如下:
[2012-01-13 14:51:25 - xxx] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.xxx.xxx.xxx$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.

Failed to load properties file for project 'xxx'

于是我把注意力放到第三方包可能加错的情况中。于是按照网上的说法,将包都重新加了一遍还是报错。

最后发现是debug证书的问题。我到C:\Users\xxx\.android\debug.keystore目录下看到

大家可以看到debug.keystore的日期是 2011-1-11,而今天是2012-1-13日,果然如网上所说,超过了一年,debug证书过期了。

于是我删掉这个文件,重新编译运行,果然没问题了,而此时 该目录又重新生成了debug.keystore,日期是今天。

如果你想重现这个问题,也很简单,必须clear工程,否则它不会再到该目录下装载证书,即使你把这个文件换成2010的也不会不错,而你clear后,

项目会重新装载证书,检测证书的有效期。希望对大家有所帮助。

Android编译错误, Ignoring InnerClasses attribute for an anonymous inner class的更多相关文章

  1. Android Error:warning: Ignoring InnerClasses attribute for an anonymous inner class

    今天项目发布时遇到了这个问题,在低版本设备上面死活发布不上去,还有打包也打不成功,折腾了好长一段时间,网上大部分给出的 解决方案都是说 在工程的混淆配置文件 proguard-rules.pro 中加 ...

  2. 【Android】Ignoring InnerClasses attribute for an anonymous inner class

    这个问题是因为Android只能有6w个方法,解决方法,在defaultConfig中加入一句:multiDexEnabled true

  3. xamarin.forms新建项目android编译错误

    vs2015 update3 新建的xamarin.forms项目中的android项目编译错误.提示缺少android_m2repository_r22.zip,96659D653BDE0FAEDB ...

  4. Android编译错误——undefined reference to

    [错误描述] 未定义引用 提示如下:bootable/recovery/minzip/Zip.c:1122: error: undefined reference to 'selabel_lookup ...

  5. 【转】ubuntu11.10 64bit 环境android编译错误

    原文网址:http://blog.csdn.net/lmhgen/article/details/7326083 错误1: 注意:external/protobuf/java/src/main/jav ...

  6. Android 编译错误

    本人使用的是Android studio1.3版本,前几天调试通过的项目,现在编译出现了错误.错误信息如下 Project app: apk dependencies can only be jars ...

  7. android编译错误“OnClickListener cannot be resolved to a type”

    在android代码编译时可能会出现如下错误: 部分代码: <span style="font-size:18px;">public void onCreate(Bun ...

  8. 我的Android进阶之旅------>Android编译错误java.util.zip.ZipException: duplicate entry的解决方法

    今天在Android Studio中把另外一个项目引入当前项目,编译的时候出现了java.util.zip.ZipException: duplicate entry错误. 错误如下所示: FAILU ...

  9. Android 编译错误——布局 Error parsing XML: not well-formed (invalid token)

    在修改了Android布局文件后,编译出现Error parsing XML: not well-formed (invalid token). 首先先排查xml文件的编码格式是否为UTF-8, &l ...

随机推荐

  1. Oracle 查询系统所有用户信息

    1.查看所有用户:select * from dba_users;   select * from all_users;   select * from user_users; 2.查看用户或角色系统 ...

  2. 將後台的Json數據返回到前台

    前台JS代碼 $.post('/Book/GetBookClassIDByName', { BookName: "旅遊手冊" }, function (data) { if (da ...

  3. delphi软件启动的顺序解密。

    运行顺序 1.主窗体的oncreate -- onshow ---- onActivate ---- onResize --- 然后继续走,这个时候主窗体已经显示出来了,猜想delphi的思路是先让主 ...

  4. visual studio code(vscode) 调试php

    1.下载vscode (visual studio code). 2.安装vscode 扩展 php-debug 安装步骤见 https://marketplace.visualstudio.com/ ...

  5. {POJ}{树状数组}

    总结一下树状数组的题目: {POJ}{3928}{Ping Pong} 非常好的题目,要求寻找一个数组中满足A[i]<A[k]<A[j]的个数,其中i<k<j(或者相反).很巧 ...

  6. 共用字体-UI界面编辑器(SkinStudio)教程

    添加一个Label控件,设置好字体属性 再添加一个Label控件,字体属性还是默认的 只需要将字体属性的Name字段名称改为需要使用的字体属性的Name字段名称即可(如Label1使用的字体)

  7. AngularJS 中设置 AJAX get 请求不缓存的方法

    var app = angular.module('manager', ['ngRoute']); app.config(['$routeProvider', function($routeProvi ...

  8. python语句表达式——黑板客老师课程学习

    1.赋值 多重赋值: a,b=1,2 a,b=’beijing’,’sh’ a,b=’bj’ a,b=(1,2) a,b=[1,2] …… 2.输入输出 输入: raw_input()   原始输入 ...

  9. android笔记:ViewPager实现界面的滑动

    最近在学习ViewPager实现界面的滑动,拜读了郭神的博客文章,并抽取归纳了自己对ViewPager的理解. ViewPager实现界面滑动的步骤如下: 1.在xml布局内加入控件android.s ...

  10. 10个你必须掌握的Linux超酷VI命令技巧

    大部分Linux开发者对vi命令相当熟悉,可是遗憾的是,大部分开发者都只能掌握一些最常用的Linux vi命令,下面介绍的10个vi命令虽然很多不为人知,但是在实际应用中又能让你大大提高效率. 在使用 ...