更新时间:2023-11-13 16:56:22
您可以使用Visual Studio内置的libRandString.so
;您不需要 build.gradle 中的externalNativeBuild
块,而无需ndkBuild
任务,也不需要nativeLibsToJar
任务. Android Studio将从 jniLibs 目录中提取预构建的文件,然后将其打包到APK中.
You can use the libRandString.so
which was built with Visual Studio; you don't need the externalNativeBuild
block and not ndkBuild
task and not the nativeLibsToJar
task in your build.gradle. Android Studio will pick up the prebuilt files from jniLibs directory and pack them into the APK for you.