Fix native lib load

This commit is contained in:
世界 2020-05-30 21:32:03 +08:00
parent 88cd325e8c
commit 688ffc3bba
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
4 changed files with 14 additions and 23 deletions

View File

@ -111,6 +111,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/NekoX"
android:largeHeap="true"
android:extractNativeLibs="true"
android:manageSpaceActivity="org.telegram.ui.ExternalActionActivity"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher"

View File

@ -5,7 +5,6 @@ import cn.hutool.core.io.resource.ResourceUtil
import org.telegram.messenger.ApplicationLoader
import org.telegram.messenger.FileLog
import java.io.File
import java.util.*
import java.util.zip.ZipFile
object FileUtil {
@ -153,10 +152,6 @@ object FileUtil {
var execFile = File(ApplicationLoader.applicationContext.applicationInfo.nativeLibraryDir, "lib$name.so")
if (!execFile.isFile) {
System.loadLibrary(name)
if (!execFile.isFile) {
FileLog.d("Native library $execFile not found")
@ -186,12 +181,6 @@ object FileUtil {
}
} else {
FileLog.d("lib found after load: $name")
}
} else {
FileLog.d("lib found in nativePath: $name")

View File

@ -7,7 +7,7 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.android.tools.build:gradle:4.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0'

View File

@ -20,3 +20,4 @@ org.gradle.configureondemand=false
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx1536M -Dkotlin.daemon.jvm.options\="-Xmx4096M" -XX\:MaxPermSize\=4096m
org.gradle.parallel=true
android.bundle.enableUncompressedNativeLibs=false