justHelloWorld
justHelloWorld

Reputation: 6842

How to search unresolved libraries in Intellij IDEA or Android Studio?

I'm trying to port Apache Flink to Android. One of the biggest problem is that some java tools doesn't exist for Android, but these conflict are not detected at compile time and the errors (NoClassDefFoundError excpetion) are detected only at runtime.

For example, Java's ManagementFactory doesn't exists for android, BUT no compile error is thrown even if in this class there are unresolved symbols/libraries, in particular:

import javax.management.MBeanServer;

import java.lang.management.BufferPoolMXBean;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryPoolMXBean;
import java.lang.management.MemoryType;
import java.lang.management.MemoryUsage;

Now, I included the Flink's jars (flink-clients, flink-java, flink-runtime and flink-streaming) in my Android Studio project and I would like to search all these kind of unresolved dependencies to avoid these kind of exception at runtime. There is any Android Studio tool for this purpose?

Upvotes: 1

Views: 535

Answers (1)

thekekc
thekekc

Reputation: 206

I think including jar dependencies in the project will not make Android Studio and a compiler to search for missing classes in already built jars. Try to include src of flink into your project. I tried that and I had all unresolved imports being red.

Upvotes: 1

Related Questions