Error about sun/misc/BASE64Encoder on Eclipse

前端 未结 4 768
执笔经年
执笔经年 2020-12-19 13:30

when i run my app in mac, and show up this message Errors occurred during the build. Errors running builder \'Android Package Builder\' on project \'IMPEXP\'. sun/misc/BASE

相关标签:
4条回答
  • 2020-12-19 13:59

    The Android code you are using is trying to use the sun.misc.BASE64Encoder class.

    This deprecated class has been removed from Java 9 so this is not going to work.

    You will need to switch back to Java 8 or find an update to the Android code (if there is one).

    0 讨论(0)
  • 2020-12-19 13:59

    In my case it was something very crazy. I have to download the eclipse IDE Version NEON

    Since the project is old almost from 2014

    Attached the url of the IDE for which you need it: Eclipse IDE NEON

    I also had to follow the same installation steps

    0 讨论(0)
  • 2020-12-19 14:13

    I'm working with Windows 7. I had to change the preferences and the ini file. Both had C:\Program Files\Java\jdk-12.0.1\bin which I changed to C:\Program Files\Java\jre1.8.0_221\bin. It now works!

    0 讨论(0)
  • 2020-12-19 14:14

    As others have pointed out already, this is a compatibility issue—you need exactly Java 8 to run Eclipse.

    • Install JDK 8 if you don’t have it already.
    • In Eclipse, go to Window > Preferences > Installed JREs. Make sure Java 8 appears in the list and is selected. After that, close Eclipse.
    • Additionally, eclipse.ini also has a reference to the Java VM it uses. Make sure the VM it points to is Java 8 (see link on how to find it and how to set VM preferences).
    • Restart Eclipse and try again.
    0 讨论(0)
提交回复
热议问题