The package java.util is accessible from more than one module: <unnamed>, java.base while adding 'android.jar' in classpath

731 Views Asked by At

I am working on a JavaFX mobile project which uses AdoptOpenJDK 11.0.4-hotspot. When I run the app on Mobile, the TextField doesn't draw android soft keyboard if it is clicked for the second time. It is same as this issue. I am trying the accepted answer in that thread where we have to create 'AndroidKeyboardService' which uses some android specific classes. For that, I added 'android.jar' in project's classpath. After that I stumbled upon another issue. Many imports started showing errors like The package java.util is accessible from more than one module: <unnamed>, java.base, The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files. Some of the StackOverflow answers suggested moving the library from modulepath to classpath. But, I've already placed that library in classpath and the imports issue still occurs. How do I resolve this issue?

0

There are 0 best solutions below