百度地图SDK错误忽略匿名内部类com.baidu的InnerClasses属性

时间:2016-09-23 13:02:22

标签: android build sdk baidu

我将Baidu Android SDK v4.0.0 sdk添加到我的项目中,一切正常,但我有一些困扰我的日志。

在gradle中我使用settigs:

compileSdkVersion 23
buildToolsVersion "23.0.3"
dependencies {

        classpath 'com.android.tools.build:gradle:2.1.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

日志:

:app:transformClassesWithDexForDebug
        To run dex in process, the Gradle daemon needs a larger heap.
        It currently has approximately 3620 MB.
        For faster builds, increase the maximum heap size for the Gradle daemon to more than 4096 MB.
        To do this set org.gradle.jvmargs=-Xmx4096M in the project gradle.properties.
        For more information see https://docs.gradle.org/current/userguide/build_environment.html

        AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
        AGPBI: {"kind":"error","text":"(com.baidu.lbsapi.auth.d) that doesn\u0027t come with an","sources":[{}]}
        AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
        AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
        AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
        AGPBI: {"kind":"error","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
        AGPBI: {"kind":"error","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
        AGPBI: {"kind":"error","text":"indicate that it is *not* an inner class.","sources":[{}]}
        AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
        AGPBI: {"kind":"error","text":"(com.baidu.lbsapi.auth.f) that doesn\u0027t come with an","sources":[{}]}
        AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
        AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
        AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
        AGPBI: {"kind":"error","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
        AGPBI: {"kind":"error","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
        AGPBI: {"kind":"error","text":"indicate that it is *not* an inner class.","sources":[{}]}

完整记录HERE

我尝试添加proguard:

1.    -keepattributes EnclosingMethod

2.    -keepattributes InnerClasses

3.    -keepattributes EnclosingMethod
      -keepattributes InnerClasses    

4.    -keepattributes InnerClasses
      -dontoptimize

5.    -keep class com.baidu.** {*;}
      -dontwarn com.baidu.**

没有任何改变

也许有人知道另一种避免这些警告的可能性

0 个答案:

没有答案