去掉bugly库,使用jdk_1.8

This commit is contained in:
Lihongda 2024-02-21 17:28:54 +08:00
parent 11eb1c7858
commit fbcc8ad36c
6 changed files with 32 additions and 16 deletions

View File

@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# AndroidX package structure to make it clearer which packages are bundled with the # 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 # Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn # https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete": # Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the # Enables namespacing of each library's R class so that its R class includes only the
@ -22,4 +22,9 @@ kotlin.code.style=official
# thereby reducing the size of the R class for that library # thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true android.nonTransitiveRClass=true
android.enableJetifier=true android.enableJetifier=true
android.useAndroidX=true
android.useDeprecatedNdk=true
versionCode=40
versionName=4.11.0

View File

@ -37,17 +37,16 @@ android {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
applicationId "com.ifish.activity" applicationId "com.ifish.activity"
// versionCode project.versionCode.toInteger() versionCode project.versionCode.toInteger()
// versionName project.versionName versionName project.versionName
multiDexEnabled true multiDexEnabled true
ndk { ndk {
abiFilters 'armeabi', 'arm64-v8a' abiFilters 'armeabi', 'arm64-v8a'
} }
} }
allprojects { allprojects {
sourceCompatibility = 1.7 sourceCompatibility = 1.8
targetCompatibility = 1.7 targetCompatibility = 1.8
} }
buildTypes { buildTypes {
debug { debug {
@ -61,6 +60,10 @@ android {
dexOptions { dexOptions {
javaMaxHeapSize '4g' javaMaxHeapSize '4g'
} }
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
} }
repositories { repositories {
@ -116,8 +119,8 @@ dependencies {
implementation files('libs/httpcore-4.4.13.jar') implementation files('libs/httpcore-4.4.13.jar')
implementation files('libs/httpclient-4.5.12.jar') implementation files('libs/httpclient-4.5.12.jar')
implementation 'com.zhy:autolayout:1.4.5' implementation 'com.zhy:autolayout:1.4.5'
implementation 'com.tencent.bugly:crashreport:latest.release' // implementation 'com.tencent.bugly:crashreport:latest.release'
implementation 'com.tencent.bugly:nativecrashreport:latest.release' // implementation 'com.tencent.bugly:nativecrashreport:latest.release'
//UDP功能模块库 //UDP功能模块库
//UDP基础库 //UDP基础库

View File

@ -26,7 +26,7 @@ import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
import com.alibaba.sdk.android.push.register.MiPushRegister; import com.alibaba.sdk.android.push.register.MiPushRegister;
import com.ifish.utils.SystemUtil; import com.ifish.utils.SystemUtil;
import com.p2p.core.P2PSpecial.P2PSpecial; import com.p2p.core.P2PSpecial.P2PSpecial;
import com.tencent.bugly.crashreport.CrashReport; //import com.tencent.bugly.crashreport.CrashReport;
import com.tendcloud.tenddata.TCAgent; import com.tendcloud.tenddata.TCAgent;
import com.umeng.commonsdk.UMConfigure; import com.umeng.commonsdk.UMConfigure;
import com.umeng.socialize.PlatformConfig; import com.umeng.socialize.PlatformConfig;
@ -183,7 +183,7 @@ public class BaseApplication extends MultiDexApplication {
//初始化腾讯bugly SDK&全局捕获Crash //初始化腾讯bugly SDK&全局捕获Crash
private void initCrashSDK() { private void initCrashSDK() {
CrashReport.initCrashReport(getApplicationContext(), "4c8cf75014", true);//注册bugly上报 // CrashReport.initCrashReport(getApplicationContext(), "4c8cf75014", true);//注册bugly上报
} }
//初始化友盟社会化分享 //初始化友盟社会化分享

View File

@ -9,7 +9,7 @@ import com.ifish.utils.Commons;
import com.ifish.utils.HttpListener; import com.ifish.utils.HttpListener;
import com.ifish.utils.HttpManager; import com.ifish.utils.HttpManager;
import com.ifish.utils.Commons.NetWork; import com.ifish.utils.Commons.NetWork;
import com.tencent.bugly.crashreport.CrashReport; //import com.tencent.bugly.crashreport.CrashReport;
import android.content.Context; import android.content.Context;
import android.net.wifi.WifiInfo; import android.net.wifi.WifiInfo;
@ -98,7 +98,7 @@ public class EspNetUtil {
try { try {
result[i] = (byte) Integer.parseInt(bssidSplits[i], 16); result[i] = (byte) Integer.parseInt(bssidSplits[i], 16);
} catch (Exception e) { } catch (Exception e) {
CrashReport.postCatchedException(e); // bugly会将这个throwable上报 // CrashReport.postCatchedException(e); // bugly会将这个throwable上报
} }
} }
return result; return result;

View File

@ -485,7 +485,7 @@ public class DeviceFragment extends BaseV4Fragment implements ObservableScrollVi
sp.putString(LoginSPKey.P2PVerifyCode1, baseBean.P2PVerifyCode1); sp.putString(LoginSPKey.P2PVerifyCode1, baseBean.P2PVerifyCode1);
sp.putString(LoginSPKey.P2PVerifyCode2, baseBean.P2PVerifyCode2); sp.putString(LoginSPKey.P2PVerifyCode2, baseBean.P2PVerifyCode2);
P2PHandler.getInstance().p2pInit(getActivity(), new P2PListener(), new SettingListener());//初始化技威 P2PHandler.getInstance().p2pInit(getActivity(), new P2PListener(), new SettingListener());//初始化技威
boolean p2pConnect = P2PHandler.getInstance().p2pConnect(baseBean.UserID, Integer.parseInt(baseBean.sessionId), Integer.parseInt(baseBean.sessionId2), Integer.parseInt(baseBean.P2PVerifyCode1), Integer.parseInt(baseBean.P2PVerifyCode2), 0);//p2p连接 boolean p2pConnect = P2PHandler.getInstance().p2pConnect(baseBean.UserID, parseInt(baseBean.sessionId), parseInt(baseBean.sessionId2), parseInt(baseBean.P2PVerifyCode1), parseInt(baseBean.P2PVerifyCode2), 0);//p2p连接
String[] cameras = new String[Commons.CAMERA.size()]; String[] cameras = new String[Commons.CAMERA.size()];
for (int i = 0; i < Commons.CAMERA.size(); i++) { for (int i = 0; i < Commons.CAMERA.size(); i++) {
cameras[i] = Commons.CAMERA.get(i).cameraId; cameras[i] = Commons.CAMERA.get(i).cameraId;
@ -540,6 +540,14 @@ public class DeviceFragment extends BaseV4Fragment implements ObservableScrollVi
} }
} }
public static int parseInt(String str) {
try {
return Integer.parseInt(str);
} catch (Exception e) {
Log.i("parseInt error", "Exception e---" + e.getMessage());
return -1;
}
}
private void gradeRuleInfo() { private void gradeRuleInfo() {
if (Commons.USER == null) { if (Commons.USER == null) {

View File

@ -29,7 +29,7 @@ import android.widget.Toast;
import com.ifish.activity.LoadingActivity; import com.ifish.activity.LoadingActivity;
import com.ifish.baseclass.UriForFile; import com.ifish.baseclass.UriForFile;
import com.tencent.bugly.crashreport.CrashReport; //import com.tencent.bugly.crashreport.CrashReport;
/** /**
* @author Jacky dada * @author Jacky dada
@ -93,7 +93,7 @@ public class CrashHandler implements UncaughtExceptionHandler {
// PendingIntent restartIntent = PendingIntent.getActivity(mContext, 0, intent,Intent.FLAG_ACTIVITY_NEW_TASK); // PendingIntent restartIntent = PendingIntent.getActivity(mContext, 0, intent,Intent.FLAG_ACTIVITY_NEW_TASK);
// AlarmManager mgr = (AlarmManager)mContext.getSystemService(Context.ALARM_SERVICE); // AlarmManager mgr = (AlarmManager)mContext.getSystemService(Context.ALARM_SERVICE);
// mgr.set(AlarmManager.RTC, System.currentTimeMillis(),restartIntent); //马上重启应用 // mgr.set(AlarmManager.RTC, System.currentTimeMillis(),restartIntent); //马上重启应用
CrashReport.postCatchedException(ex); // bugly会将这个throwable上报 // CrashReport.postCatchedException(ex); // bugly会将这个throwable上报
L.i("========上报Exception=========="); L.i("========上报Exception==========");
} catch (Exception e) { } catch (Exception e) {
} }