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
generate aar with p4a, use the aar in the Kotlin app, and I can confirm the build apk contains the so file
can in kt like this
override fun onStart() {
super.onStart()
val context=super.getContext()
ServiceP4a_test_service.prepare(context)
ServiceP4a_test_service.start(context,"aa")
}
and I found aar extrac the so like this
public static void prepare(Context ctx) {
String appRoot = PythonUtil.getAppRoot(ctx);
Log.v("PythonService", "Ready to unpack");
File app_root_file = new File(appRoot);
PythonUtil.unpackAsset(ctx, "private", app_root_file, true);
PythonUtil.unpackPyBundle(ctx, ctx.getApplicationInfo().nativeLibraryDir + "/libpybundle", app_root_file, false);
}
V/pythonutil: Unpacking /data/app/~~vqTf2YNP6WZ6OwaMQTcqEA==/com.devgg.call_aar_test2-_AkXT_nq1pzrbvNKk5m0Zw==/lib/arm64/libpybundle app
V/pythonutil: Data version is a9469a597a257b56f0553f0a5d5b88f55a98ef9e
V/pythonutil: Extracting /data/app/~~vqTf2YNP6WZ6OwaMQTcqEA==/com.devgg.call_aar_test2-_AkXT_nq1pzrbvNKk5m0Zw==/lib/arm64/libpybundle assets.
I/.call_aar_test2: This is non sticky GC, maxfree is 33554432 minfree is 8388608
I/.call_aar_test2: WaitForGcToComplete blocked ObjectsAllocated on Background for 15.741ms
E/python: opening up extract tar
java.io.FileNotFoundException: /data/app/~~vqTf2YNP6WZ6OwaMQTcqEA==/com.devgg.call_aar_test2-_AkXT_nq1pzrbvNKk5m0Zw==/lib/arm64/libpybundle.so: open failed: ENOENT (No such file or directory)
The text was updated successfully, but these errors were encountered:
👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.
If you're having trouble installing or using python-for-android, maybe you could be interested in our quickstart guide.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.
I got the same "no such file" error if this is not enabled (the native libs directory would be empty). After enabling it in the app, the python bundle is loaded successfully.
I got the same "no such file" error if this is not enabled (the native libs directory would be empty). After enabling it in the app, the python bundle is loaded successfully.
Versions
Description
generate aar with p4a, use the aar in the Kotlin app, and I can confirm the build apk contains the so file
can in kt like this
and I found aar extrac the so like this
buildozer.spec
Command:
p4a aar --private /pytest/p4a-library --package=comd.devgg.p4a_aartest --name "p4alibrary" --version 0.1 --android-api 31 --bootstrap service_library --requirements python3 --service=echo:service.py --arch=arm64-v8a
Logs
The text was updated successfully, but these errors were encountered: