• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

renaming package (containing MainActivity.java)

colinjava

Lurker
I've been playing with JNI and NDK for a couple of weeks and had some success but also a lot of confusion.

I basically downloaded the mandelbrot explorer (open source) from this developers site:
https://dmitrybrant.com/software-for-android

I got it working in android studio and have been able to use the ndk to compile c++ code successfully.

The problem is when I upload this modified code to my phone it always overwrites the original mandelbrot set app I downloaded from the playstore.

I've tried creating a project from fresh and copying over the relevent files/folders, but every time it fails at the System.loadLibrary(...) statement.

Now I've just been trying to rename the package, I do this, then click the button that makes the changes elsewhere in the code, but then that same error comes up again.
If I rename the package to its original value and click the button to make the changes, the app works normally again.

Its frustrating, I can't keep using a modified version of someone elses project, there has to be a solution.
Please let me know if you know how I can change the package name and still have it work.

Thanks.
 
I got it working, I think I was forgetting to change function names in the c code to reflect the new package name in the java.
Can't believe I missed that, but still trying to figure it all out.
 
Back
Top Bottom