将 Android 应用程序部署到模拟器失败并出现 NoClassDefFoundError

Deploy Android app to emulator fails with NoClassDefFoundError

我有以下环境:

Eclipse v4.19.0

Android 开发工具 v23.0.7 (Eclipse 插件)

JRE:8、7、6、5

当我想将测试 Android 应用程序部署到模拟器时,我收到以下错误消息:

Eclipse 日志:

!ENTRY org.eclipse.core.resources 4 2 2021-05-14 18:40:51.825 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". !STACK 0 java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder

!ENTRY org.eclipse.core.resources 4 566 2021-05-14 18:40:51.826 !MESSAGE Errors occurred during the build. !SUBENTRY 1 com.android.ide.eclipse.adt 4 75 2021-05-14 18:40:51.826 !MESSAGE Errors running builder 'Android Package Builder' on project 'First'. !STACK 0 java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder

问题出在哪里?为什么找不到 class?

好的,所以解决方案是安装:

JRE 8

Eclipse IDE 2019-06 (v4.12.0)

Android 开发工具 v23.0.7.2120684

以上内容完美运行!