Android Studio 3.1 构建失败,gradle 4.4 类签名者信息与同包中其他类的签名者信息不匹配

2022-01-12 00:00:00 java libgdx android-studio-3.1

我正在使用 libgdx 在 Android Studio 3.1 中创建一个项目,但我无法构建我的项目,因为它说:

I'm making a project in Android Studio 3.1 with libgdx and i can't build my project because it says:

class "org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings"'s signer information does not match signer information of other classes in the same package

但我不使用bouncycastle"之类的我检查了很多关于这个问题的页面和主题,但我没有找到任何解决方案.我也没有任何 jar 文件,我从来没有尝试过签名,我只是想建立我的项目请帮帮我,我真的坚持下去了

But i don't use "bouncycastle" or something I checked a lot pages and topics about this problem but i didn't find any solutions for this. Also i haven't any jar files and i never tried to sign something, i'm only trying to build my project Please help me guys, i really stuck at it

推荐答案

更新:Java 10.0.2 与 GDX 1.9.8 有问题,所以我降级到 Java 8,一切都按预期工作.如果您安装了最新的 Java 10,请卸载并下载并安装 Java 8 版本.

Update: Java 10.0.2 was having issues with GDX 1.9.8 so I downgraded to Java 8 and everything is working as expected. If you installed the latest Java 10, uninstall and download and install the java 8 version.

旧评价:

我最近在使用 android 3.1.4 和当前版本的 libgdx(jar 下载于 09/xx/2018)时遇到了这个问题.

I've recently encountered this issue with android 3.1.4 and a current version of libgdx(jar downloaded on 09/xx/2018).

环境:全新安装的 Windows 7 Ultimate + sp1 + 便利汇总,gdx-setup.jar(2018 年 9 月 xx 日),+ Android Studio 3.1.4(全新安装),java 10.0.2.

Environment: Freshly installed Windows 7 Ultimate + sp1 + convenience rollup, gdx-setup.jar(September xx, 2018), + Android Studio 3.1.4(clean install), java 10.0.2.

问题重现:gdx-setup.jar 用我更新的build-tools"+api"生成了一个项目,但该项目没有在 Android Studio 中编译并产生最初发布的错误.

Problem reproduced: gdx-setup.jar with my updated "build-tools" + "api" produced a project, but the project did not compile in Android Studio and produced the error originally posted.

进程:gdx-setup.jar 及其默认 build-tools(27.0.3) 和默认 api(27) 将产生关于不正确 api 28 > 27 的错误,这可能与某些无关,但新安装Android Studio 3.1.4 可能会遇到这种情况.使用 Android studio sdk-manager(工具选项卡)并下载 27.0.3 build-tools 和 sdk-tools(确保检查显示包详细信息"以查看可见性).安装上述内容并在默认值下重新运行 gdx-set.jar 后,我能够生成项目,甚至可以在 Android Studio 上编译/运行.

Process: gdx-setup.jar with its default build-tools(27.0.3) and default api(27) will produce an error about incorrect api 28 > 27, which may not be relevant to some, but new installations of Android Studio 3.1.4 may encounter this. Used Android studio sdk-manager(tools tab) and downloaded 27.0.3 build-tools and sdk-tools (make sure the "Show package details" is checked for visibility). After installing the above and rerunning gdx-set.jar on defaults, I was able to produce the project and even compile/run on Android studio.

GDX 的临时解决方案(2018 年 9 月):确保 Android Studio 具有:build-tools 27.0.3 + sdk-tools 27,并使用工具的默认值创建 gdx 项目(创建 gdx 项目时两个提示均否).

Temporary Solution for GDX(September 2018): Ensure Android Studio has: build-tools 27.0.3 + sdk-tools 27, and create the gdx project using defaults for tools (No to both prompts when creating gdx project).

相关文章