1. Are you ready for the Galaxy S20? Here is everything we know so far!

renaming package (containing MainActivity.java)

Discussion in 'Android Development' started by colinjava, Aug 19, 2019.

  1. colinjava

    colinjava Lurker
    Thread Starter

    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:

    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.


  2. colinjava

    colinjava Lurker
    Thread Starter

    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.

Share This Page