Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android如何检查lib中的.so文件是否存在_Android_Kotlin - Fatal编程技术网

android如何检查lib中的.so文件是否存在

android如何检查lib中的.so文件是否存在,android,kotlin,Android,Kotlin,在我的应用程序中,我必须检查特定的.so文件是否存在。 对于此Im,请使用以下代码: val fileName = filesDir?.parent + "/lib/libnative-lib.so" val file = File(fileName) if (!file.exists()) { Log.e(TAG, "file not exist") } 在APK中,我有以下结构lib/x86/libnative-lib.so 我还尝试

在我的应用程序中,我必须检查特定的.so文件是否存在。 对于此Im,请使用以下代码:

val fileName = filesDir?.parent + "/lib/libnative-lib.so"
    val file = File(fileName)
    if (!file.exists()) { Log.e(TAG, "file not exist") }
在APK中,我有以下结构lib/x86/libnative-lib.so

我还尝试了以下方法

    val fileName = filesDir?.parent + "/lib/x86/libnative-lib.so"
我已经在emulator上运行了我的代码,结果是get-File不存在 如何解决