Import Android library into Java project: NoClassDefFoundError

0

I'm trying to import an Android library into a Java desktop project. But the library does not find any class that is related to import android.os .

I'm having difficulty with the Handler android.os.Handler class.

Any replacement for this:

public void run() {
    Looper.prepare();
    handler = new Handler();
    Looper.loop();
}
    
asked by anonymous 28.10.2015 / 21:20

1 answer

0

If the library in question uses Android features, such as the android.os package, then you will not be able to use it in a java desktop project. The library is not designed to be platform-free, so it will be restricted to Android.

    
29.10.2015 / 11:36