且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

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

更新时间:2023-01-11 10:14:31

更新: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).