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

  • Home
  • SEARCH
  • 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 8525951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:07:45+00:00 2026-06-11T08:07:45+00:00

I have a C++ library and I made some JNI code to export it

  • 0

I have a C++ library and I made some JNI code to export it into the Android world. I also created an Android App which uses my JNI interface.

To use the library, I imported all the *.java and *.h / *.cpp files in my Eclipse App project (into the right folder), then I created the *.mk files for the NDK. I compiled the library with ndk-build and loaded it into the target device with Eclipse. The App works fine.

Now I would like to separate the App from the library. So, I compiled name.jar which contains the Java files of the JNI interface, then I compiled the libname.so with ndk-build for the C++ stuff. Then I put name.jar into newproject/libs and libname.so into newproject/libs/armeabi. Consider “newproject” the App I created without the library source code (I don’t want to release the source code, only the .jar and .so).

The result is a crash of the App with the memory dump into LogCat. I used System.loadLibrary(“name”) in a static context.

Anybody can help me?

  • 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-06-11T08:07:47+00:00Added an answer on June 11, 2026 at 8:07 am

    My procedure was OK. I found the problem: my app was loading the lib and it was running the C++ code. By the way the crash happened early on a socket() call. I had to set the INTERNET permission into the manifest file.

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

Sidebar

Related Questions

I have a big project compiled into libProject.so-file (shared library), I made some modules
We have made some changes in the skia library of Android OS (Froyo) and
Say that I have made some software (which has both library form and can
I have a smallish utility library I made that I had created in TFS
I am creating a logging facility for my library, and have made some nice
I would like to trace calls to some 3rd party library which are made
I have made a Google login with OAuth2 and the PHP library which can
I have some socket connection code that makes use of boost::asio which reads from
I have some owl classes which have instances. These classes also have properties which
See I have made a library which has several .h & several .c files.

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.