Aleksei Petrenko
Aleksei Petrenko

Reputation: 7188

"Add native support" missing for Android project in Eclipse

Following NDK Getting Started tutorial I installed Eclipse, SDK and NDK. I also set up correct path to NDK in Window > Preferences > Android > NDK as described here: http://developer.android.com/ndk/guides/setup.html#configure

Then in the "Verification" section of this document I am asked to load "hello-jni" project, right click it and select Android Tools > Add Native Support.

But there's just no such option! How do I diagnose this? Is there something wrong with NDK? I am using Ubuntu 14.04, NDK is added to path. App runs OK when I press "Run" in Eclipse, but displays lots of syntax errors in C++ code like:

Method 'NewStringUTF' could not be resolved hello-jni.c /HelloJni/jni   line 62 Semantic Error
Type 'JNIEnv' could not be resolved hello-jni.c /HelloJni/jni   line 27 Semantic Error
Type 'jobject' could not be resolved    hello-jni.c /HelloJni/jni   line 28 Semantic Error
Type 'jstring' could not be resolved    hello-jni.c /HelloJni/jni   line 26 Semantic Error

Upvotes: 2

Views: 1378

Answers (1)

cj1098
cj1098

Reputation: 1610

install android studio, and use the NDK inside that. It's about (and I'm not exaggerating) 500000000000000000 times better. Although right now its just a preview, it will be fully released soon (I hope)

http://tools.android.com/tech-docs/android-ndk-preview

Upvotes: 1

Related Questions