Gradleを使用して「警告:匿名の内部クラスのInnerClasses属性を無視する」を抑制する方法Gradleを使用して「警告:匿名の内部クラスのInnerClasses属性を無視する」を抑制する方法
- これではないProGuardの中でも、私がやって抑制したい私はProGuardの
- を使用して抑制したいですかこれはない重複した質問
./gradlew assembleDebug
通常(これはassertj-core
あるので、 -./gradlew testDebug
)
依存関係:
dependencies {
testCompile "org.assertj:assertj-core:1.7.1"
}
警告:
Dex: warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.assertj.core.internal.cglib.reflect.FastClassEmitter$3) 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.
のような何か:私はこの警告を抑制するために追加することができますどのようなcompilerArgs
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
configure(options) {
compilerArgs << "-Xlint:-options" // Turn off "missing" bootclasspath warning
}
}
?
参考文献:
- 私はここに答えを持っているが、これらのどれもが、この警告を抑制しません:How do I suppress warnings when compiling an android library with gradle?
なぜプロガードを使用しないのですか? – cipley
@cipleyこれはアセンブル時に発生します。 –