1

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":[{}]}

完全なログはこちら

私は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