1. Download our Official Android App: Forums for Android!

Apps Using NDK through Eclipse ADT plugin?

Discussion in 'Android Development' started by nfries88, Dec 4, 2010.

  1. nfries88

    nfries88 Lurker
    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    2
    Joined:
    Dec 4, 2010

    Dec 4, 2010
    2
    0
    25
    I'm unable to run my very simple test program using JNI, and I noticed that there is no .so in the resulting .apk file; so I think that the IDE is not even compiling my C file; and certainly not including it in the .apk file.

    Is there an option for it somewhere I'm missing (I'm using newest SDK and newest version of Eclipse, Helios), or will I need to build manually using the tools included in the NDK?
     

    Advertisement

  2. paulscode

    paulscode Well-Known Member
    Rank:
    None
    Points:
    38
    Posts:
    86
    Joined:
    Mar 18, 2010

    Mar 18, 2010
    86
    14
    38
    Do you have the Sequoyah plug-in installed? If not, I highly recommend it. It will allow you to right-click on the project and select "Android Tools --> Add Native Support". Then when you choose the "clean" or "build" options, your shared native libraries will automatically be built and placed into the libs/aremabi directory for you. Sequoyah also adds some extremely useful native debugging capabilities.

    I've never used the NDK without Sequoyah, so I'm not sure how to manually build them from within Eclipse without it. A workaround would be to close Eclipse, go to the command prompt / terminal, navigate to the project directory, and run the "ndk-build" command. Bad thing about that method, though, is you would have to keep going back to the terminal every time you changed the code. I'm sure it is possible to run "ndk-build" from within Eclipse without the Sequoyah plugin, but I'll leave that for someone who has experience.
     
  3. baris3437

    baris3437 Newbie
    Rank:
    None
    Points:
    15
    Posts:
    12
    Joined:
    Oct 26, 2010

    Oct 26, 2010
    12
    0
    15
  4. apachetechnology

    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Dec 17, 2010

    Dec 17, 2010
    1
    0
    5
    Android Tools --> Add Native Support.

    What NDK path is required to set
     

Share This Page

Loading...