Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7688387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:54:31+00:00 2026-05-31T19:54:31+00:00

Sorry to ask such a noob question, but the NDK documentation is wrong (r7b):

  • 0

Sorry to ask such a noob question, but the NDK documentation is wrong (r7b):

If you are developing in Eclipse with ADT, use the New Project Wizard
to create a new Android project for each sample, using the “Import
from Existing Source” option and importing the source from
<ndk>/apps/<app_name>/project/. Then, set up an AVD, if necessary, and
build/run the application in the emulator.

There is no “apps” folder, and the samples do not contain a “project” folder. So … what is the correct way to run a sample?

Also, can I configure Eclipse to build the C++ portion of the code automatically?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:54:32+00:00Added an answer on May 31, 2026 at 7:54 pm
    1. Click File | New | Project…
    2. Choose Android project, Next
    3. Project Name: This is the project name shown in Package Explorer. It is just a string stored in the .project file that Eclipse creates. No file or folder is created with this name, and the output binaries do not seem to contain this name.
    4. Click "Create project from existing source"
    5. Location: choose the project’s root folder, e.g. …/android-ndk-r7b/samples/bitmap-plasma
    6. Click Next and choose your target API. Eclipse does not seem to allow this to be changed later, at least not from the GUI. I don’t know why Eclipse does not simply get this information from <uses-sdk> in AndroidManifest.xml or from the "target" line in default.properties. I also don’t know why the two may be different (e.g. in the bitmap-plasma sample, target=android-9 but <uses-sdk android:minSdkVersion="8"/>.)
    7. Click next and consider changing the "Package Name" field which defaults to "your.package.namespace". However, the project will run fine if you do not change this field. Leave "Create Activity" and "Create a Test Project" unchecked.
    8. Click Finish. Eclipse will create numerous extra files (e.g. .classpath, .project, project.properties) and folders (bin, gen, assets) alongside the existing code. That’s in addition to the output folders created by ndk-build (obj and libs).

    Eclipse won’t build the native code by itself, but it will automatically deploy the native code (e.g. libplasma.so) if it is aware of it. After you build the native code on the command line, e.g.:

    C:\...\android-ndk-r7b\samples\bitmap-plasma>..\..\ndk-build
    Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
    Gdbsetup       : libs/armeabi/gdb.setup
    Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi-v7a/gdbserver
    Gdbsetup       : libs/armeabi-v7a/gdb.setup
    "Compile thumb : plasma <= plasma.c
    SharedLibrary  : libplasma.so
    Install        : libplasma.so => libs/armeabi/libplasma.so
    "Compile thumb : plasma <= plasma.c
    SharedLibrary  : libplasma.so
    Install        : libplasma.so => libs/armeabi-v7a/libplasma.so
    

    Right-click your project and choose "Refresh", otherwise Eclipse might fail to upload the native code when it starts the emulator.

    Finally, to run the sample, right-click the project and choose Run As | Android application. See here about choosing which emulator is used.

    See here about configuring Eclipse to build the native code automatically.

    I am curious why NDK produces two *.so files with very different sizes for each ABI, e.g. it creates libs/armeabi-v7a/libplasma.so (15 KB) but also obj/local/armeabi-v7a/libplasma.so (63 KB). Anyone know the difference?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am very sorry to ask such a basic question but I am new
I'm sorry to ask such a simple question, but it's a specific question I've
I'm sorry to ask such a basic question, but it's kind of fundamental for
I'm very sorry to ask such an easy question for you. I can use
I'm sorry to ask such a basic question but I could not find a
Sorry to ask such a question, but I've spent 1/2 hour on this and
Sorry to ask such a bad question.But i do not know how to take
Sorry for being the 100000th person to ask the same question. But I guess
(I am sorry, I wanted to ask this question on meta first, but it
Sorry to ask such a general question as I'm sure a lot of questions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.