2016-12-29 8 views
0

はすでに
-keepattributesが と-dontwarnのInnerClasses proguard-rules.pro上
なし成功:(
君たちは、任意のヒントを得たのEnclosingMethod試してみました?Android - どのようにこれらのgradle/proguardの警告を排除するには?

Information:Gradle tasks [:app:assembleMobilePFDebug] Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.util.ArchiveMaintainer$2) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.util.ArchiveMaintainer$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.unzip.Unzip$2) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.unzip.Unzip$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.zip.ZipEngine$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.samsung.android.sdk.pass.c) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.samsung.android.sdk.pass.d) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.samsung.android.sdk.pass.a) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.samsung.android.sdk.pass.b) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.samsung.android.sdk.pass.e) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class. Information:BUILD SUCCESSFUL Information:Total time: 1 mins 43.541 secs Information:80 errors Information:0 warnings Information:See complete output in console

Gradleのファイルを(それの主要部) :

apply plugin: 'com.android.application' 
apply plugin: 'jacoco' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.1" 

    dexOptions{ 
     maxProcessCount 3 
     javaMaxHeapSize "2g" 
    } 

    defaultConfig { 
     applicationId "com.xyz" 
     minSdkVersion 19 
     targetSdkVersion 22 
     versionCode 1 
     testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' 
     multiDexEnabled true 
    } 

    buildTypes { 
     debug { 
      debuggable true 
     } 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 

    testOptions { 
     unitTests.returnDefaultValues = true 
    } 

    task jacocoTestReport(type: JacocoReport, dependsOn: "test"){ 

     group = "Reporting" 
     description = "Generate Jacoco coverage reports after running tests." 

     reports { 
      xml.enabled = true 
      html.enabled = true 
     } 

     classDirectories = fileTree(
       dir: "./build/intermediates/classes/debug", 
       excludes: [ '**/R*.class', 
          '**/*$InjectAdapter.class', 
          '**/*$ModuleAdapter.class', 
          '**/*$ViewInjector.class'] 
     ) 

     def coverageSourceDirs = [ 
       "src/main/java" 
     ] 

     sourceDirectories = files(coverageSourceDirs) 
     executionData = files("${project.buildDir}/jacoco/${jacocoTestReport}.exec") 
    } 

    productFlavors { 
     xyz { 
      applicationId "com.xyz" 
      versionName "1.2" 
      resValue "string", "app_name", "xyz" 
      versionCode "1" 
     } 
    } 
    packagingOptions { 
     exclude 'META-INF/DEPENDENCIES.txt' 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/NOTICE.txt' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/DEPENDENCIES' 
     exclude 'META-INF/notice.txt' 
     exclude 'META-INF/license.txt' 
     exclude 'META-INF/dependencies.txt' 
     exclude 'META-INF/LGPL2.1' 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    compile 'com.android.support:appcompat-v7:23.4.0' 
    compile 'com.android.support:design:23.4.0' 
    testCompile fileTree(include: ['*.jar'], dir: 'libs/testLibs') 
    testCompile 'junit:junit:4.12' 
    androidTestCompile fileTree(include: ['*.jar'], dir: 'libs/androidTestLibs') 
    androidTestCompile 'com.android.support:support-annotations:23.4.0' 
    androidTestCompile 'junit:junit:4.12' 
    androidTestCompile 'com.android.support.test:runner:0.5' 
    androidTestCompile 'org.mockito:mockito-core:1.10.19' 
    compile 'me.dm7.barcodescanner:zxing:1.8.4' 
    compile 'com.google.code.gson:gson:2.4' 
    compile files('libs/zip4j_1.3.2.jar') 
} 


android.applicationVariants.all { variant -> 
    variant.javaCompile.options.compilerArgs += [ 
      '-AresourcePackageName=com.xyz' 
    ] 
} 

のjava -version & &のjavac -version
Javaのバージョン "1.7.0_71"
のJava(TM)SEランタイム環境(1.7.0_71-B14を構築)
は、Java HotSpot(TM)64ビットサーバーVM(24.71-B01、混合モードを構築する)
のjavac 1.7 .0_71

+0

Java(JDK)のバージョンは? – naXa

+0

プロジェクトをきれいにして再構築してみてください。 – mbacvanski

+0

既にクリーニングと再構築を試しました。 –

答えて

0

更新

代わりにこのラインを試してみてください:

-keepattributes InnerClasses,EnclosingMethod,Signature 

をこの問題は、このpostに似ています。基本的には、この行をproguard-rules.proファイルに追加するだけです。

-keepattributes EnclosingMethod 
+0

で編集しました。Hi ...私はそれを試しましたが、残念ながら私の場合は何の効果もありません。 –

+0

答えを更新しました。そのことが分かれば教えてください。 –

+0

更新された回答を使用しない効果:( –

関連する問題