From ba472b57680643c4ed9ad9d181ad7ec3bef214fe Mon Sep 17 00:00:00 2001 From: Kr328 <39107975+Kr328@users.noreply.github.com> Date: Wed, 11 Dec 2019 10:21:56 +0800 Subject: [PATCH] fix libclash.so not found --- app/build.gradle | 4 +- gradle.properties | 50 +++++++++---------- .../kr328/clash/service/ClashService.kt | 2 - .../kr328/clash/service/StubSoLoader.kt | 10 ---- 4 files changed, 27 insertions(+), 39 deletions(-) delete mode 100644 service/src/main/java/com/github/kr328/clash/service/StubSoLoader.kt diff --git a/app/build.gradle b/app/build.gradle index dd7da1e..4550780 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ android { applicationId "com.github.kr328.clash" minSdkVersion 24 targetSdkVersion 29 - versionCode 10017 - versionName "1.0.17-alpha" + versionCode 10018 + versionName "1.0.18-alpha" } buildTypes { release { diff --git a/gradle.properties b/gradle.properties index a15bc6d..44e0c53 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,25 +1,25 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true -# Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official - -kapt.incremental.apt=false - -android.bundle.enableUncompressedNativeLibraries=false \ No newline at end of file +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official + +kapt.incremental.apt=false + +android.bundle.enableUncompressedNativeLibs=false \ No newline at end of file diff --git a/service/src/main/java/com/github/kr328/clash/service/ClashService.kt b/service/src/main/java/com/github/kr328/clash/service/ClashService.kt index 6311286..969314e 100644 --- a/service/src/main/java/com/github/kr328/clash/service/ClashService.kt +++ b/service/src/main/java/com/github/kr328/clash/service/ClashService.kt @@ -185,8 +185,6 @@ class ClashService : Service(), IClashEventObserver, ClashEventService.Master, override fun onCreate() { super.onCreate() - StubSoLoader.loadSo() - clash = Clash( this, filesDir.resolve("clash"), diff --git a/service/src/main/java/com/github/kr328/clash/service/StubSoLoader.kt b/service/src/main/java/com/github/kr328/clash/service/StubSoLoader.kt deleted file mode 100644 index 90402f5..0000000 --- a/service/src/main/java/com/github/kr328/clash/service/StubSoLoader.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.github.kr328.clash.service - -import androidx.annotation.Keep - -@Keep -object StubSoLoader { - fun loadSo() { - System.loadLibrary("clash") - } -} \ No newline at end of file