Jak ukryć "Ostrzeżenie: Ignorowanie atrybutu InnerClasses dla anonimowej klasy wewnętrznej" z Gradle?Jak ukryć "Ostrzeżenie: Ignorowanie atrybutu InnerClasses dla anonimowej klasy wewnętrznej" z Gradle?
- to nie duplikat pytanie
- To nie podczas PROGUARD ani nie chcę, aby stłumić stosując PROGUARD
- chciałbym tłumić robi normalne
./gradlew assembleDebug
(ponieważ jest toassertj-core
-./gradlew testDebug
)
Zależność:
dependencies {
testCompile "org.assertj:assertj-core:1.7.1"
}
Ostrzeżenie:
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.
Coś jak:
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
configure(options) {
compilerArgs << "-Xlint:-options" // Turn off "missing" bootclasspath warning
}
}
Co compilerArgs
mogę dodać do tłumienia to ostrzeżenie?
Referencje:
- mam odpowiedź tutaj, ale żaden z nich nie tłumić to ostrzeżenie: How do I suppress warnings when compiling an android library with gradle?
Dlaczego nie używać proguard? – cipley
@cipley Dzieje się to podczas montażu. –