0

How I can do this without compile again the native code and all stuff?

2 Answers 2

1

It seems like you are probably doing jni to this library. If that is the case, the java package and class name needs to be encoded in the names of the jni functions, so you would have to do something such as:

  • Always keep the same name for the java package and class file which actually interfaces to the native library. This does not need to match the main package name for the APK. You may want to make this a sort of wrapper for the native library.

  • Or you could create a new native library using the new package name which is just a wrapper calling the original library by it's original function names. This will be a bit more complicated to set up than the previous idea.

Sign up to request clarification or add additional context in comments.

Comments

0

Create libs/<arch> folder, and put the so file there. Eclipse or ant build system will automatically pick it up and package in apk file.

In place of <arch> use one of armeabi, armeabi-v7a, x86 or mips - depending on how .so file has been built.

2 Comments

I tried that before but didnt work.. And if i changed for old name package,that i used before,works..
@userxxxxx - you need the original source and rebuild it to match the package name! If you don't, no can do, except revert to the old package name... just saying :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.