0

I made an android project that imports into the sun package. the sun package that I use is sun.security.jca.GetInstance. I know if this sun package cannot be used, is there a substitute for this package? I currently use JDK 9 and have changed to JDK 7 and 8 but this sun package still cannot be used

java.lang.NoClassDefFoundError: Failed resolution of: Lsun/security/jca/GetInstance;
  • 1
    Your choice of JDK does not matter. That class is not in the Android SDK. Why are you using that class? The implementation of JCA, JSSE, etc. use classes in other packages (`java.security`), some of which are in the Android SDK. – CommonsWare Dec 16 '19 at 23:40
  • I use that library because I was asked by a lecturer to change a java project from java netbeans to android. When I ran the project on netbeans, it worked. But when I try on Android, the sun package doesn't work and I don't know what package can replace it. – nindyy Islamidina Dec 17 '19 at 03:00

0 Answers0