修复“忽略 InnerClasses 属性”警告

2024-02-17

我想修复此警告,让我每次构建此输出:

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.sun.jna.Native$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.sun.jna.Native$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:(com.sun.jna.Native$3) 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.sun.jna.Native$4) 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.sun.jna.Native$5) 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.sun.jna.Native$6) 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.sun.jna.Native$7) 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.sun.jna.NativeLibrary$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.sun.jna.NativeLibrary$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:(com.sun.jna.Structure$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.sun.jna.win32.W32APITypeMapper$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.sun.jna.win32.W32APITypeMapper$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.

我已经尝试过针对这些问题给出的其他解决方案:

  • 此警告是什么:忽略不附带关联 EnclosureMethod 属性的匿名内部类的 InnerClasses 属性 https://stackoverflow.com/questions/17141832/what-is-this-warning-ignoring-innerclasses-attribute-for-an-anonymous-inner-cla
  • 编译期间的“Ignoring InnerClasses attribute”警告输出是什么? https://stackoverflow.com/questions/3308010/what-is-the-ignoring-innerclasses-attribute-warning-output-during-compilation/3308059#3308059
  • Proguard 问题“警告:忽略匿名内部类的 InnerClasses 属性” https://stackoverflow.com/questions/35796144/progaurd-issue-warningignoring-innerclasses-attribute-for-an-anonymous-inner-c
  • android Dx 警告:忽略匿名内部类 jar 文件问题的 InnerClasses 属性 https://stackoverflow.com/questions/26993474/android-dx-warning-ignoring-innerclasses-attribute-for-an-anonymous-inner-class

这是我的 build.gradle 文件:

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

android {

    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "com.example.marco.myapp"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }

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

    lintOptions {
        abortOnError false
    }

    dexOptions {
        preDexLibraries true
        javaMaxHeapSize "3g"
        incremental true
        dexInProcess = true
    }

    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
        exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
        exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
    }

}

dependencies {
    compile files('libs/slf4j-api-1.7.5.jar')

    //include jar libraries -> rstincanoffline dependencies
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile files('libs/slf4j-jdk14-1.7.5.jar')
    compile files('libs/tincan-0.3.1-SNAPSHOT-jar-with-dependencies-jarjar.jar')

    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'

    // stetho -> for debug purpose
    compile 'com.facebook.stetho:stetho:1.3.1'
    compile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
    compile 'com.facebook.stetho:stetho-js-rhino:1.3.1'

    //gson dependency
    compile 'com.google.code.gson:gson:2.4'

    //google autovalue dependencies
    //apt 'com.google.auto.value:auto-value:1.1'
    compile 'com.google.auto.value:auto-value:1.2'
    apt 'com.google.guava:guava:19.0'
    provided 'org.glassfish:javax.annotation:10.0-b28'
    apt 'com.google.code.findbugs:jsr305:2.0.1'
    apt 'com.google.auto.service:auto-service:1.0-rc2'
    apt 'com.sun.jna:jna:3.0.9'

    //picasso dependency
    compile 'com.squareup.picasso:picasso:2.5.2'

    //realm dependency
    compile 'io.realm:realm-android:0.83.0+'
}

如果有人能帮助我那就太好了!


None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

修复“忽略 InnerClasses 属性”警告 的相关文章

  • android中.so文件的实际用途是什么? [复制]

    这个问题在这里已经有答案了 我想在我的应用程序中实现类似聊天的环聊 我一直在使用 opentok 库 我在其中看到了 libopentok so 文件 谁能告诉我 libopentok so 文件的确切用法是什么 在Android中 我们可
  • 使用 iOS 分布式应用程序时 Google Cloud Messaging 显示“notRegistered”

    我在 iOS 应用程序上实现了 GCM 服务 我使用 PHP 在服务器上发送 GCM 当应用程序由开发配置文件签名时 它可以完美运行 也就是说 当应用程序使用 GCM 配置注册自身时 它始终返回一个正常运行的设备令牌 我可以使用令牌向设备发
  • 如何将库项目添加到 Android Studio?

    如何添加库项目 例如 Sherlock ABS 到安卓工作室 https en wikipedia org wiki Android Studio 不是针对旧的基于 Eclipse 的 ADT 捆绑包 而是针对新的 ADT安卓工作室 htt
  • 从当前位置出发的移动网络行车路线

    我正在构建一个网站的移动版本 试图通过一键式链接来启动 Google 地图 并提供从用户当前位置到企业的行车路线 我让它在 iPhone 上运行良好 但在 Android 上测试时 它会查看 Current 20Location 并尝试查找
  • 加载内容时在 ImageView 中使用“动画圆圈”

    我目前在我的应用程序中使用一个列表视图 可能需要一秒钟才能显示 我目前所做的是使用列表视图的 id android empty 属性来创建 正在加载 文本
  • 为什么 Cursor.requery() 被标记为“已弃用”?

    Cursor requery 是一种非常常见的方法 使用它来刷新 ListView 的内容 但为什么这个方法被标记为 已弃用 呢 我不太清楚 API 文档上的原因 Cursor requery API http developer andr
  • Android - 如何在 ListView 的背景上显示垂直线(并根据行高)?

    如何在背景上显示一条垂直线 如下图蓝色突出显示的那条 在此示例中 我有一个带有 ImageView 元素的 ListView 和 TextView 但它与线条无关 并且我希望这些项目的背景上有一条垂直线 让人感觉它们与每个项目 连接 另请注
  • 在较低的 SDK 上运行具有较高 SDK 的应用程序

    我想知道在 Android 3 0 中开发的应用程序是否可以在 Android 2 1 上运行 如果是这样 我该怎么做 如果我使用 3 0 中的库 例如片段 开发应用程序 它可以在 2 1 中使用吗 不会 但是 2 1 应用程序可以在 3
  • Eclipse Oxygen - 该项目未构建,因为其构建路径不完整

    我刚刚安装了 Eclipse Oxygen 并尝试在工作台中打开现有项目 但收到此错误 该项目未构建 因为其构建路径不完整 不能 找到 java lang Object 的类文件 修复构建路径然后尝试 建设这个项目 我尝试右键单击该项目 转
  • JaCoCo 显示 0% 覆盖率,即使所有测试均已通过

    我在下面写了一些测试用例androidTest目录 我正在使用 androidx testInstrumentationRunner androidx test runner AndroidJUnitRunner 添加的依赖项 androi
  • 原因:打开 zip 文件时出错(android-studio)

    当我创建一个新项目时 我完成这些步骤并单击 完成 并等待项目打开 但我看到一个错误 我无法解决这个问题 我的安装和问题详细信息 我在使用以下命令将 github 项目导入 Android Studio 后遇到了这个问题File gt Imp
  • 如何创建用于测试的对象的 PagedList?

    我一直在使用 Google 的 arch 库 但是让测试变得困难的一件事是使用PagedList 对于此示例 我使用存储库模式并从 API 或网络返回详细信息 因此 在 ViewModel 中 我调用此接口方法 override fun g
  • Facebook 好友请求 - 失踪好友

    我请求从我正在开发的 Android 应用程序中获取用户好友 从 Facebook Api V2 0 开始 我知道我应该只获取已经通过我的应用程序登录的用户好友 但是 尽管我知道用户的某些朋友已通过我的应用程序登录 但在请求该用户的朋友时
  • Android - 带动画的可扩展 TextView

    我有一个TextView首先显示长文本的一小部分 用户可以按 查看更多 按钮来展开TextView并查看该文本的其余部分 进行测试 我可以通过简单地交换以下值来实现这一点TextView setMaxLines介于 4 之间 用于折叠 和
  • 从前台服务的活动中释放内存

    我有一个带有前台服务和一项活动的应用程序 该服务可以在启动时自行启动 也可以从 Activity 中启动 我注意到当服务在启动时自行启动时 内存使用量约为 3MB 一旦我打开该 Activity 内存使用量就会跃升至约 9mB 一旦 Act
  • 如何为键盘上的 xml 中的功能键设置不同的背景?

    我正在开发 Android 键盘应用程序 我尝试为普通键和功能键设置不同的背景 但它不起作用
  • 如何使 Edittext 大小保持不变?安卓

    我知道使 Edittext 左侧的文本 消失 以保持单行的属性 singleLine true 但我的问题是 当我在显示视图之前填充编辑文本时 在这种情况下 我的编辑文本都超出了屏幕 有任何想法吗 谢谢 这是填充空的 Edittext 时得
  • 对于双核手机,availableProcessors() 返回 1

    我最近购买了一部 Moto Atrix 2 手机 当我尝试查看手机中的处理器规格时 Runtime getRuntime availableProcessors 返回 1 proc cpuinfo 也仅包含有关处理器 0 的信息 出于好奇
  • Android - 从渲染线程内结束活动

    下午好 我不熟悉 android 中的活动生命周期 并且一直在尽可能地阅读 但我不知道如何以良好的方式解决以下问题 我有一个使用 GLSurfaceView 的活动来在屏幕上绘制各种内容 在这个 GLSurfaceView 的渲染线程中 我
  • Android Webview:无法调用确定的可见性() - 从未见过 pid 的连接

    我有一个 Android Webview 当我单击链接下载文件 pdf 图像等 时 我收到一条错误消息 Error message Cannot call determinedVisibility never saw a connectio

随机推荐