You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
If you want to try to debug this issue, one suggestion is to dump the exported symbols using the command nm -gCD libaapt2.so and look through output to see if nativeCompile is in the list.
@JonForShort Binaries are helpful and works well, But now on a higher android API level I faced permission denied error while executing binaries with runtime.execute(). Will try to export symbols as you suggested. Thanks for the information.
I faced no issue in loading the shared library in MainActivity.java
So I loaded the shared libraries from private storage as follows:
I added two extra related
x86
libraries before loadinglibaapt2.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:
I face the following issue in the logs:
Attaching the full project's google drive link
Tagging @JonForShort @timscriptov
The text was updated successfully, but these errors were encountered: