Nabdreas
Nabdreas

Reputation: 3467

Cannot find JDK '<unknown>' for module 'appcompatV7'

I have this error popping up.

Error:java: Cannot find JDK '' for module 'appcompatV7'

I cant work out why its happening, im using compatibility library and added it in the project structure. Selected it as "Library module" and added as module dependency.

Its working fine on another project with exactly the same set up.

Upvotes: 1

Views: 2872

Answers (2)

Nabdreas
Nabdreas

Reputation: 3467

Found solution. I restarted Android Studio and messaged popped up saying, "Error loading project: cannot load 2 modules" within android.iml file, suggested i remove it, then recompiled and it worked. Thanks for the ideas guys!

Upvotes: 1

ChuongPham
ChuongPham

Reputation: 4801

JDK v7 won't work as the appcompat libraries are compiled against Java v6, so you'll need JDK v1.6.45.

You can download the JDK here.

Install the JDK and try again.

Upvotes: 0

Related Questions