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 8321247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:57:05+00:00 2026-06-08T22:57:05+00:00

Is there any way to relocate my source code (including all .h .cpp and

  • 0

Is there any way to relocate my source code (including all .h .cpp and .mk files) outside of project folder? In other words, i want to move out content of jni folder out of android project folder. Now, physical structure of my project looks like this:

.../ProjectFolder/AndroidProjectFolder/jni/(sources and make files)
.../ProjectFolder/AndroidProjectFolder/(other android project files)
.../ProjectFolder/iosProjectFolder/(other ios project files)

I want to make like this:

.../ProjectFolder/src/(sources and make files)
.../ProjectFolder/AndroidProjectFolder/(other android project files)
.../ProjectFolder/iosProjectFolder/(other ios project files)

Is there any correct way to do it?

  • 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-08T22:57:07+00:00Added an answer on June 8, 2026 at 10:57 pm

    Yes, you can do that. I use the directory above jni for instance MyProject/src/ This sample builds a shared library…You can also build static libraries. Notice the $(call my-dir)/.. the ‘call my-dir)’ points to the jni directory that contains the Android.mk file. So adding the /.. backs it up a directory.

    LOCAL_PATH  := $(call my-dir)/..
    
    include $(CLEAR_VARS)
    
    FILE_LIST := $(wildcard $(LOCAL_PATH)/src/*.cpp)
    
    ifdef DEBUG
    CONFIG_DIR  := Debug
    LOCAL_CFLAGS    := -Werror -Wno-psabi -O0 -ggdb -D_DEBUG
    LOCAL_CXXFLAGS    := -Werror -Wno-psabi -O0 -ggdb -D_DEBUG -fexceptions
    LOCAL_LINK_FLAGS    := -ggdb
    else
    CONFIG_DIR  := Release
    LOCAL_CFLAGS    := -Werror -Wno-psabi -O2 -DNDEBUG
    LOCAL_CXXFLAGS  := -Werror -Wno-psabi -O2 -DNDEBUG -fexceptions
    endif
    
    LOCAL_MODULE    := MyProject
    LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
    LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
    LOCAL_LDFLAGS   := $(LOCAL_LINK_FLAGS)
    LOCAL_LDLIBS    += -lGLESv2 -landroid -llog -lGLESv1_CM -lEGL
    
    include $(BUILD_SHARED_LIBRARY)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there any way to know through code what are all download requests I
Is there any way to update nested documents by id or some other field?
Is there any way to achieve compiling Node.js scripts as native code, like Hip-Hop
Is there any way to count all fields with null values for specific record
Is there any way of shortening line #2 of the code below? for i
Is there any way you can get CreatedBy field for SPListItem Folder . I
Is there any way to retreive the keys of a hashmap other then using
Is there any way to tell Yard not to clutter up my Rails project's
Is there any way to turn off the monitor screen light using java code
Is there any way to bind to all the number keys in Tkinter? It

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.