-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I faced no issue in loading the shared library in MainActivity.java
So I loaded the shared libraries from private storage as follows:
System.load("/data/data/com.myexample.runaapt2so/files/platform/x86/system/lib/libc++.so");
System.load("/data/data/com.myexample.runaapt2so/files/platform/x86/system/lib/libprotobuf-cpp-lite.so");
System.load("/data/data/com.myexample.runaapt2so/files/x86/lib/libaapt2.so");
I added two extra related x86
libraries before loading libaapt2.so
to resolve some issues I found in the logs.
I used the java interface from here and created an instance of the Aapt2.java from MainActivity.java as follows:
Aapt2 aapt2Jni = new Aapt2();
List<String> list = new ArrayList<String>();
list.add("");
aapt2Jni.compile(list);
I face the following issue in the logs:
java.lang.UnsatisfiedLinkError: No implementation found for void com.android.tools.aapt2.Aapt2.nativeCompile(java.util.List) (tried Java_com_android_tools_aapt2_Aapt2_nativeCompile and Java_com_android_tools_aapt2_Aapt2_nativeCompile__Ljava_util_List_2)
at com.android.tools.aapt2.Aapt2.nativeCompile(Native Method)
at com.android.tools.aapt2.Aapt2.compile(Aapt2.java:15)
at com.myexample.runaapt2so.MainActivity.onCreate(MainActivity.java:53)
Attaching the full project's google drive link
Tagging @JonForShort @timscriptov
Metadata
Metadata
Assignees
Labels
No labels