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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:33:35+00:00 2026-06-04T15:33:35+00:00

I try to build my project, that have two .so files: libTheGame.so liblua.so Both

  • 0

I try to build my project, that have two .so files:
libTheGame.so
liblua.so
Both is in the apk, but project crash when I launch it with:

Caused by: java.lang.IllegalArgumentException: Unable to load native
library: /data/data/com.piotrekb.theGame/lib/libTheGame.so

I can build and lunch project with both so, but without lua library added to TheGame :/
But when I add

LOCAL_SHARED_LIBRARIES := lua

crash happen :/

This is my android.mk:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_ARM_MODE  := arm
LOCAL_MODULE    := lua
LOCAL_SRC_FILES := ./Libs/lua-5.2.0/src/llex.c \
./Libs/lua-5.2.0/src/lapi.c \
./Libs/lua-5.2.0/src/loadlib.c \
./Libs/lua-5.2.0/src/lvm.c \
./Libs/lua-5.2.0/src/lundump.c \
./Libs/lua-5.2.0/src/lauxlib.c \
./Libs/lua-5.2.0/src/lparser.c \
./Libs/lua-5.2.0/src/lgc.c \
./Libs/lua-5.2.0/src/lobject.c \
./Libs/lua-5.2.0/src/lstrlib.c \
./Libs/lua-5.2.0/src/lbaselib.c \
./Libs/lua-5.2.0/src/ldebug.c \
./Libs/lua-5.2.0/src/lmem.c \
./Libs/lua-5.2.0/src/ltable.c \
./Libs/lua-5.2.0/src/loslib.c \
./Libs/lua-5.2.0/src/ldo.c \
./Libs/lua-5.2.0/src/ltablib.c \
./Libs/lua-5.2.0/src/liolib.c \
./Libs/lua-5.2.0/src/ldump.c \
./Libs/lua-5.2.0/src/ldblib.c \
./Libs/lua-5.2.0/src/lstate.c \
./Libs/lua-5.2.0/src/lctype.c \
./Libs/lua-5.2.0/src/lcode.c \
./Libs/lua-5.2.0/src/lcorolib.c \
./Libs/lua-5.2.0/src/lzio.c \
./Libs/lua-5.2.0/src/lmathlib.c \
./Libs/lua-5.2.0/src/lbitlib.c \
./Libs/lua-5.2.0/src/ltm.c \
./Libs/lua-5.2.0/src/lstring.c \
./Libs/lua-5.2.0/src/lopcodes.c \
./Libs/lua-5.2.0/src/linit.c \
./Libs/lua-5.2.0/src/lfunc.c  
LOCAL_LDLIBS    := -lm 
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(BUILD_SHARED_LIBRARY)



include $(CLEAR_VARS)
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)/Libs/cml-1_0_2 -I$(STLPORT_BASE)/stlport
LOCAL_MODULE    := TheGame

LOCAL_SRC_FILES :=  ./UISystem/UISystem.cpp ./ScriptSystem/ScriptSystem.cpp ./World3D/World3D.cpp ./ResourceSystem/ResourceSystem.cpp ./Renderer/Image.cpp \
 ./Renderer/Model3D.cpp ./LevelSystem/LevelSystem.cpp ./Renderer/ShaderProgram.cpp ./Common/Common.cpp ./Common/Engine.cpp ./Common/InDataBunch.cpp \
 ./Common/OutDataBunch.cpp ./Input/Input.cpp ./Game/Game.cpp ./Renderer/GL20Renderer.cpp \
 ./EntitySystem/EntitySystem.cpp TheGame.cpp 
LOCAL_LDLIBS    := -lm -llog -landroid -lGLESv2 -lEGL
LOCAL_SHARED_LIBRARIES := lua ##this line causes crash
LOCAL_STATIC_LIBRARIES := android_native_app_glue
LOCAL_CFLAGS+=$(LOCAL_C_INCLUDES)
include $(BUILD_SHARED_LIBRARY)
$(call import-module,android/native_app_glue)

Do you have any idea how can I deal with this :/ ?
I looked into similar questions, but them don’t 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-04T15:33:38+00:00Added an answer on June 4, 2026 at 3:33 pm

    I had very similar problem. Finally ended up compiling libraries in separate mk files.

    I think this answer might help you. Android NDK linking

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

Sidebar

Related Questions

I have a project that uses the serial port, and it requires two files
When I try to build a project in Visual Studio 2005 that has a
i have 3 maven project (starto.commons,starto.hibernate,starto.server) that use some same dependencies and two of
I try to build project in Eclipse on Linux Ubuntu. Eclipse show error message:
i try to build a app that is in landsscape mode all the time.
Im try to build my plugins that sit in a seperate directory on the
I've included: #import QuartzCore/QuartzCore.h but when I try to build, I get the error
I have a small project that builds a number of targets from the same
I have two Android projects, a 'library project' containing a custom layout, and an
I just got a project in Borland JBuilder 2006 that I cannot even build.

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.