pull/1185/head
gedoor 3 years ago
parent e3cf5733b9
commit fa80569374
  1. 6
      app/build.gradle
  2. 1
      app/src/main/java/io/legado/app/App.kt
  3. 1
      app/src/main/java/io/legado/app/help/http/HttpHelper.kt
  4. 5
      app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.java
  5. 6
      build.gradle
  6. 2
      gradle/wrapper/gradle-wrapper.properties

@ -89,9 +89,9 @@ android {
dimension "mode"
applicationId "io.legado.cronet"
manifestPlaceholders = [APP_CHANNEL_VALUE: "cronet"]
// ndk {
// abiFilters 'arm64-v8a','armeabi-v7a'
// }
ndk {
//abiFilters 'arm64-v8a','armeabi-v7a'
}
}
}
compileOptions {

@ -14,7 +14,6 @@ import io.legado.app.help.AppConfig
import io.legado.app.help.CrashHandler
import io.legado.app.help.LifecycleHelp
import io.legado.app.help.ThemeConfig.applyDayNight
import io.legado.app.help.http.cronet.CronetLoader
import io.legado.app.utils.LanguageUtils
import io.legado.app.utils.defaultSharedPreferences

@ -2,7 +2,6 @@ package io.legado.app.help.http
import io.legado.app.help.AppConfig
import io.legado.app.help.http.cronet.CronetInterceptor
import io.legado.app.help.http.cronet.CronetLoader
import kotlinx.coroutines.suspendCancellableCoroutine
import okhttp3.ConnectionSpec
import okhttp3.Credentials

@ -56,8 +56,6 @@ public class CronetLoader extends CronetEngine.Builder.LibraryLoader {
File dir = mContext.getDir("lib", Context.MODE_PRIVATE);
soFile = new File(dir + "/" + getCpuAbi(), soName);
downloadFile = new File(mContext.getCacheDir() + "/so_download", soName);
}
public boolean install() {
@ -150,7 +148,8 @@ public class CronetLoader extends CronetEngine.Builder.LibraryLoader {
public static String getCpuAbi() {
//貌似只有这个过时了的API能获取当前APP使用的ABI
//貌似只有这个过时了的API能获取当前APP使用的ABI,添加注解免得编译时报错
//noinspection deprecation
return Build.CPU_ABI;
}

@ -5,14 +5,14 @@ buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.3'
classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.4'
}
}

@ -1,6 +1,6 @@
#Fri May 07 15:24:46 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

Loading…
Cancel
Save