I built a lib.so in C++ with NDK, how do I tell Ant to factor .so & .a libs into the package, it makes an apk file but the libs directory it makes is empty...
I read that there needs to be an armabi folder, I put the libs in arm64-v8a but nothing changed still.
Thanks
project.properties
target=android-29
has.keystore=true
key.store=C:/path
key.alias=mykey
source.dir=.
gen.dir=gen
resource.dir=res
asset.dir=assets
external.libs.dir=.
out.dir=Package/bin
key.store.password=pw
key.alias.password=pw
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="help">
<property file="ant.properties" />
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</condition>
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail message="sdk.dir is missing. Make sure ANDROID_HOME
environment variable is correctly set."
unless="sdk.dir"/>
<import file="custom_rules.xml" optional="true" />
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
<target name="-pre-compile">
<path id="project.all.jars.path">
<path path="${toString:project.all.jars.path}"/>
<fileset dir="${jar.libs.dir}">
<include name="*.jar"/>
</fileset>
</path>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project name="custom_rules">
<target name="clean">
<delete dir="Package"/>
<delete dir="gen"/>
<delete dir="libs"/>
</target>
<xmlproperty file="AndroidManifest.xml" prefix="custom"
collapseAttributes="true" />
<condition property="version.code" value="${env.BUILD_NUMBER}"
else="${custom.manifest.android:versionCode}">
<isset property="env.BUILD_NUMBER" />
</condition>
<property name="version.name"
value="${custom.manifest.android:versionName}.${version.code}" />
<target name="-set-mode-check" depends="android_rules.-set-mode-
check, -release-prompt-for-password, -set-apk-filenames" />
<target name="-set-apk-filenames">
<condition property="custom.tag" value="release">
<contains string="${ant.project.invoked-targets}"
substring="release" />
</condition>
<condition property="custom.tag" value="debug">
<contains string="${ant.project.invoked-targets}"
substring="debug" />
</condition>
<condition property="custom.tag" value="instrumented">
<contains string="${ant.project.invoked-targets}"
substring="instrument" />
</condition>
<condition property="custom.suffix" value="unsigned"
else="unaligned">
<contains string="${ant.project.invoked-targets}"
substring="release" />
</condition>
</target>
</project>
Must be a way to do it, Visual Studio uses Ant for packaging with .so & .a files for ARM64 but they have some recipe intermediary step that just saves paths to all lib resources.
Thanks