android–Proguard问题“警告:忽略匿名内部类的InnerClasses属性”

android–Proguard问题“警告:忽略匿名内部类的InnerClasses属性”,第1张

概述我不知道如何描述这个问题.我搜索了很多,但我找不到任何解决方案.此解决方案也没有帮助我-keepattributesEnclosingMethod:dependencies{compileproject(':libraries:material-drawer')compilefileTree(dir:'libs',include:['*.jar'])testCompile'junit:

我不知道如何描述这个问题.我搜索了很多,但我找不到任何解决方案.

此解决方案也没有帮助我-keepattributes EnclosingMethod:

dependencIEs {    compile project(':librarIEs:material-drawer')    compile filetree(dir: 'libs', include: ['*.jar'])    testCompile 'junit:junit:4.12'    compile 'com.androID.support:appcompat-v7:23.2.0'    compile 'com.androID.support:recyclervIEw-v7:23.2.0'    compile 'com.androID.support:design:23.2.0'    compile 'com.Google.code.gson:gson:2.4'    compile 'com.mcxiaoke.volley:library:1.0.19'    compile 'com.squareup.picasso:picasso:2.5.2'    compile 'com.squareup.okhttp:okhttp:2.4.0'    compile 'de.greenrobot:eventbus:2.4.0'    compile 'com.commit451:PhotoVIEw:1.2.4'    compile 'com.nineoldandroIDs:library:2.4.0'    compile 'com.vIEwpagerindicator:vIEwpagerindicator:2.4.3'    compile('com.github.afollestad.material-dialogs:commons:0.8.5.6@aar') {        transitive = true    }    compile('com.crashlytics.sdk.androID:crashlytics:2.5.5@aar') {        transitive = true;    }}

jar文件夹包含ormlite-androID-4.48.jar和ormlite-core-4.48.jar.

Proguard文件:

-keepattributes EnclosingMethod-dontobfuscate-keep public class * extends androID.support.v4.vIEw.ActionProvIDer {    public <init>(androID.content.Context);}-dontwarn androID.support.v4.**#FOR APPCOMPAT 23.1.1:-keep class !androID.support.v7.vIEw.menu.*MenuBuilder*, androID.support.v7.** { *; }-keep interface androID.support.v7.* { *; }# required for crashlytics#-keep class com.crashlytics.** { *; }#-keep class com.crashlytics.androID.**-keepattributes Sourcefile,lineNumbertable,*Annotation*# required for eventbus-keepclassmembers class ** {    @org.greenrobot.eventbus.Subscribe <methods>;}-keep enum org.greenrobot.eventbus.ThreadMode { *; }-keepclassmembers class ** {    public voID onEvent*(**);}# Ormlite uses reflection-keep class com.j256.**-keepclassmembers class com.j256.** { *; }-keep enum com.j256.**-keepclassmembers enum com.j256.** { *; }-keep interface com.j256.**-keepclassmembers interface com.j256.** { *; }# Keep the helper class and its constructor-keep class * extends com.j256.ormlite.androID.apptools.OrmlitesqliteOpenHelper-keepclassmembers class * extends com.j256.ormlite.androID.apptools.OrmlitesqliteOpenHelper {  public <init>(androID.content.Context);}# Keep all model classes that are used by Ormlite# Also keep their fIEld names and the constructor-keep @com.j256.ormlite.table.Databasetable class * {    @com.j256.ormlite.fIEld.DatabaseFIEld <fIElds>;    @com.j256.ormlite.fIEld.ForeignCollectionFIEld <fIElds>;}-keep public class org.codehaus.**-keep public class java.nio.**##---------------Begin: proguard configuration for Gson  ----------# Gson uses generic type information stored in a class file when working with fIElds. Proguard# removes such information by default, so configure it to keep all of it.-keepattributes Signature# Gson specific classes-keep class sun.misc.Unsafe { *; }#-keep class com.Google.gson.stream.** { *; }# Application classes that will be serialized/deserialized over Gson-keep class com.packagename.database.tables.** { *; }-keep class com.packagename.models.APIdata.** { *; }-keep class com.packagename.models.data.** { *; }## NineolddroID related classes to ignore-keep class com.nineoldandroIDs.animation.** { *; }-keep interface com.nineoldandroIDs.animation.** { *; }-keep class com.nineoldandroIDs.vIEw.** { *; }-keep interface com.nineoldandroIDs.vIEw.** { *; }-dontwarn okio.**

错误日志:

Warning:Ignoring InnerClasses attribute for an anonymous inner classthis warning is that reflective operations on this class will incorrectly(androID.support.v4.app.FragmentTransitionCompat21) that doesn't come with an(androID.support.v4.vIEw.accessibility.AccessibilityNodeProvIDerCompatJellyBean) that doesn't come with anWarning:Ignoring InnerClasses attribute for an anonymous inner classindicate that it is *not* an inner class.Warning:Ignoring InnerClasses attribute for an anonymous inner classand without specifying any "-target" type options. The consequence of ignoringthis warning is that reflective operations on this class will incorrectly(androID.support.v4.vIEw.VIEwPropertyAnimatorCompatJB) that doesn't come with anand without specifying any "-target" type options. The consequence of ignoring(io.fabric.sdk.androID.services.common.ExecutorUtils) that doesn't come with ancompiler that dID not target the modern .class file format. The recommendedWarning:Ignoring InnerClasses attribute for an anonymous inner classassociated EnclosingMethod attribute. This class was probably produced by asolution is to recompile the class from source, using an up-to-date compilercompiler that dID not target the modern .class file format. The recommendedcompiler that dID not target the modern .class file format. The recommended(androID.support.v4.vIEw.accessibility.AccessibilityNodeProvIDerCompatKitKat) that doesn't come with anindicate that it is *not* an inner class.this warning is that reflective operations on this class will incorrectlyand without specifying any "-target" type options. The consequence of ignoring(androID.support.v4.vIEw.AccessibilityDelegateCompatIcs) that doesn't come with ansolution is to recompile the class from source, using an up-to-date compilerand without specifying any "-target" type options. The consequence of ignoring(androID.support.v4.app.FragmentTransitionCompat21) that doesn't come with ansolution is to recompile the class from source, using an up-to-date compilerindicate that it is *not* an inner class.solution is to recompile the class from source, using an up-to-date compilercompiler that dID not target the modern .class file format. The recommendedthis warning is that reflective operations on this class will incorrectlyassociated EnclosingMethod attribute. This class was probably produced by aWarning:Ignoring InnerClasses attribute for an anonymous inner classsolution is to recompile the class from source, using an up-to-date compilerand without specifying any "-target" type options. The consequence of ignoringsolution is to recompile the class from source, using an up-to-date compilerand without specifying any "-target" type options. The consequence of ignoringassociated EnclosingMethod attribute. This class was probably produced by aindicate that it is *not* an inner class.Warning:Ignoring InnerClasses attribute for an anonymous inner classindicate that it is *not* an inner class.(androID.support.v4.vIEw.VIEwPropertyAnimatorCompatKK) that doesn't come with anand without specifying any "-target" type options. The consequence of ignoringWarning:Ignoring InnerClasses attribute for an anonymous inner classsolution is to recompile the class from source, using an up-to-date compilerthis warning is that reflective operations on this class will incorrectlysolution is to recompile the class from source, using an up-to-date compilerassociated EnclosingMethod attribute. This class was probably produced by aWarning:Ignoring InnerClasses attribute for an anonymous inner class(androID.support.v4.vIEw.VIEwPropertyAnimatorCompatICS) that doesn't come with an(androID.support.v4.app.FragmentTransitionCompat21) that doesn't come with ansolution is to recompile the class from source, using an up-to-date compilerthis warning is that reflective operations on this class will incorrectlythis warning is that reflective operations on this class will incorrectlycompiler that dID not target the modern .class file format. The recommendedsolution is to recompile the class from source, using an up-to-date compiler(androID.support.v4.app.FragmentTransitionCompat21) that doesn't come with anindicate that it is *not* an inner class.this warning is that reflective operations on this class will incorrectlycompiler that dID not target the modern .class file format. The recommendedindicate that it is *not* an inner class.solution is to recompile the class from source, using an up-to-date compilercompiler that dID not target the modern .class file format. The recommendedand without specifying any "-target" type options. The consequence of ignoringand without specifying any "-target" type options. The consequence of ignoringindicate that it is *not* an inner class.this warning is that reflective operations on this class will incorrectlycompiler that dID not target the modern .class file format. The recommendedWarning:Ignoring InnerClasses attribute for an anonymous inner classthis warning is that reflective operations on this class will incorrectlycompiler that dID not target the modern .class file format. The recommendedWarning:Ignoring InnerClasses attribute for an anonymous inner classindicate that it is *not* an inner class.associated EnclosingMethod attribute. This class was probably produced by acompiler that dID not target the modern .class file format. The recommendedassociated EnclosingMethod attribute. This class was probably produced by aindicate that it is *not* an inner class.and without specifying any "-target" type options. The consequence of ignoringthis warning is that reflective operations on this class will incorrectlyWarning:Ignoring InnerClasses attribute for an anonymous inner classthis warning is that reflective operations on this class will incorrectly(androID.support.v4.vIEw.AccessibilityDelegateCompatJellyBean) that doesn't come with anWarning:Ignoring InnerClasses attribute for an anonymous inner classassociated EnclosingMethod attribute. This class was probably produced by aassociated EnclosingMethod attribute. This class was probably produced by aand without specifying any "-target" type options. The consequence of ignoring(androID.support.v4.vIEw.VIEwCompatLollipop) that doesn't come with anassociated EnclosingMethod attribute. This class was probably produced by asolution is to recompile the class from source, using an up-to-date compilerWarning:Ignoring InnerClasses attribute for an anonymous inner classcompiler that dID not target the modern .class file format. The recommendedindicate that it is *not* an inner class.this warning is that reflective operations on this class will incorrectlyWarning:Ignoring InnerClasses attribute for an anonymous inner classindicate that it is *not* an inner class.associated EnclosingMethod attribute. This class was probably produced by athis warning is that reflective operations on this class will incorrectlyindicate that it is *not* an inner class.solution is to recompile the class from source, using an up-to-date compilerassociated EnclosingMethod attribute. This class was probably produced by a(com.androID.volley.ExecutorDelivery) that doesn't come with ansolution is to recompile the class from source, using an up-to-date compilercompiler that dID not target the modern .class file format. The recommendedand without specifying any "-target" type options. The consequence of ignoringassociated EnclosingMethod attribute. This class was probably produced by aand without specifying any "-target" type options. The consequence of ignoringindicate that it is *not* an inner class.compiler that dID not target the modern .class file format. The recommendedsolution is to recompile the class from source, using an up-to-date compilerand without specifying any "-target" type options. The consequence of ignoringindicate that it is *not* an inner class.this warning is that reflective operations on this class will incorrectlyassociated EnclosingMethod attribute. This class was probably produced by aassociated EnclosingMethod attribute. This class was probably produced by a(io.fabric.sdk.androID.services.common.ExecutorUtils) that doesn't come with anWarning:Ignoring InnerClasses attribute for an anonymous inner classcompiler that dID not target the modern .class file format. The recommendedassociated EnclosingMethod attribute. This class was probably produced by acompiler that dID not target the modern .class file format. The recommendedand without specifying any "-target" type options. The consequence of ignoringUncaught translation error: com.androID.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type int using a local variable of type androID.support.design.Widget.CoordinatorLayout$LayoutParams. This is symptomatic of .class transformation tools that ignore local variable information.

其余的错误日志:

copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.commit451/PhotoVIEw/1.2.4/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.crashlytics.sdk.androID/crashlytics-core/2.3.8/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.github.afollestad.material-dialogs/commons/0.8.5.6/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.github.afollestad.material-dialogs/core/0.8.5.6/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.vIEwpagerindicator/vIEwpagerindicator/2.4.3/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.androID.support/support-v4/23.2.0/jars/classes.jar] (filtered)  copying resources from program jar [/home/ibrahim/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.4.0/5b72bf48563ea8410e650de14aa33ff69a3e8c35/okio-1.4.0.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.crashlytics.sdk.androID/answers/1.3.6/jars/classes.jar] (filtered)  copying resources from program jar [/home/ibrahim/.gradle/caches/modules-2/files-2.1/com.nineoldandroIDs/library/2.4.0/e9b63380f3a242dbdbf103a2355ad7e43bad17cb/library-2.4.0.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/io.fabric.sdk.androID/fabric/1.3.10/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.crashlytics.sdk.androID/crashlytics/2.5.5/jars/classes.jar] (filtered)  copying resources from program jar [/home/ibrahim/.gradle/caches/modules-2/files-2.1/com.Google.code.gson/gson/2.4/695b63d702f505b9b916e02272e3b6381bade7f/gson-2.4.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.crashlytics.sdk.androID/beta/1.1.4/jars/classes.jar] (filtered)  copying resources from program jar [/home/ibrahim/.gradle/caches/modules-2/files-2.1/com.mcxiaoke.volley/library/1.0.19/a8f23f65fc1e522ee4a1a697ee569901a46741fa/library-1.0.19.jar] (filtered)  copying resources from program jar [/home/ibrahim/.gradle/caches/modules-2/files-2.1/com.squareup.picasso/picasso/2.5.2/7446d06ec8d4f7ffcc53f1da37c95f200dcb9387/picasso-2.5.2.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.androID.support/recyclervIEw-v7/23.2.0/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.mikepenz/iconics/1.6.2/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/transforms/mergeJavaRes/release/jars/2/1f/main.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/Appname.librarIEs/material-drawer/unspecifIEd/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.androID.support/appcompat-v7/23.2.0/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.androID.support/support-v4/23.2.0/jars/libs/internal_impl-23.2.0.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.androID.support/support-vector-drawable/23.2.0/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.androID.support/design/23.2.0/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.androID.support/animated-vector-drawable/23.2.0/jars/classes.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/com.mikepenz/iconics-core/1.6.2/jars/classes.jar] (filtered)  copying resources from program jar [/home/ibrahim/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp/okhttp/2.4.0/40340c0748190fe897baf7bffbc1b282734294e5/okhttp-2.4.0.jar] (filtered)  copying resources from program jar [/home/ibrahim/.gradle/caches/modules-2/files-2.1/de.greenrobot/eventbus/2.4.0/ddd166d01b3158d1c00576d29f7ed15c030df719/eventbus-2.4.0.jar] (filtered)  copying resources from program jar [path/to/application/app/build/intermediates/exploded-aar/me.zhanghai.androID.materialprogressbar/library/1.1.4/jars/classes.jar] (filtered)

解决方法:

尝试添加

-keepattributes InnerClasses-dontoptimize

到ProGuard配置.这应该解决问题.

可能会应用不兼容的优化(可能会导致错误日志的最后一行).

如果要允许优化,则需要使用优化配置优化配置

-optimizations optimization_filter 

ProGuard配置中的选项.

总结

以上是内存溢出为你收集整理的android – Proguard问题“警告:忽略匿名内部类的InnerClasses属性”全部内容,希望文章能够帮你解决android – Proguard问题“警告:忽略匿名内部类的InnerClasses属性”所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1101510.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存