4
上roboguice 2.0添加依賴後,我跑gradle build
的Android gradle產出和roboguice 2.0警告
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() } 依賴關係類路徑'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
}
}
我知道他們只是警告,但我是初學者試驗這個新的構建系統,我想確保我在正確的軌道上。
問候,
我將這個標記爲答案,但是從源代碼重新編譯android構建工具並不是我期待的。 – Calin
您不需要重新編譯android構建工具,而是使用此類net.sf.cglib.util.StringSwitcher的jar。 – DevNG
是什麼導致了這種必然性?我必須將Android'gradle' JAR作爲庫添加到我的項目中,而不是使用Maven(不要問,不是我的決定)。當我這樣做時,我收到了200個這樣的消息。那麼,每次我更新JAR的版本時,我都必須重新編譯它? –