gpt4 book ai didi

Android gradle 和 roboguice 2.0 警告

转载 作者:太空宇宙 更新时间:2023-11-03 10:22:42 25 4
gpt4 key购买 nike

添加对 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 文件如下所示:

构建脚本{ 存储库{ mavenCentral() } 依赖关系{ 类路径 'com.android.tools.build:gradle: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?

关于Android gradle 和 roboguice 2.0 警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17391056/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com