1

我将百度 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":[{}]}

完整的日志在这里

我试图添加proguard:

1.    -keepattributes EnclosingMethod

2.    -keepattributes InnerClasses

3.    -keepattributes EnclosingMethod
      -keepattributes InnerClasses    

4.    -keepattributes InnerClasses
      -dontoptimize

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

没有什么变化

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

4

0 回答 0