在添加了对roboguice 2.0的依赖之后,我在运行gradle build时收到了很多警告
warning: Ignoring InnerClasses attribute for an anonymous inner class
(net.sf.cglib.util.StringSwitcher$Generator$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.
我的build.gradle文件如下所示:
buildscript {
存储库{
mavenCentral()
}
依赖{
classpath’com.android.tools.build:grad:0.4.2′
}
}
apply plugin: 'android-library'
repositories {
mavenCentral()
}
dependencies {
compile files('/libs/android-support-v4.jar')
compile 'org.roboguice:roboguice:2.0'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 10
targetSdkVersion 16
}
}
我知道他们只是警告,但我是初学者正在试验这个新的构建系统,我想确保我走在正确的轨道上.
问候,
最佳答案 它需要担心你可以通过从源代码重新编译jar来消除警告.更多信息@
What is the “Ignoring InnerClasses attribute” waning outputted during compilation?