在项目gradle文件中将debuggable设置为False时,MainActivity在运行时关闭,没有理由。但是当App可调试时,它的工作正常。 我检查过logcat但没有找到帮助我。 有谁有想法?
logcat输出为:
02-07 11:08:48.157 13586-13586/? E/Zygote: v2
02-07 11:08:48.157 13586-13586/? I/libpersona: KNOX_SDCARD checking this for 10177
02-07 11:08:48.157 13586-13586/? I/libpersona: KNOX_SDCARD not a persona
02-07 11:08:48.167 13586-13586/? W/SELinux: Function: selinux_compare_spd_ram, index[1], priority [2], priority version is VE=SEPF_SECMOBILE_6.0.1_0031
02-07 11:08:48.167 13586-13586/? E/Zygote: accessInfo : 0
02-07 11:08:48.167 13586-13586/? W/SELinux: SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=ir.androidsoftware.TelegramNew
02-07 11:08:48.217 13586-13586/? D/TimaKeyStoreProvider: TimaSignature is unavailable
02-07 11:08:48.217 13586-13586/? D/ActivityThread: Added TimaKeyStore provider
02-07 11:08:48.287 13586-13586/? I/InjectionManager: Inside getClassLibPath + mLibMap{0=, 1=}
02-07 11:08:48.287 13586-13586/? W/ResourcesManager: getTopLevelResources: /data/app/ir.androidsoftware.TelegramNew-1/base.apk / 1.0 running in ir.androidsoftware.TelegramNew rsrc of package ir.androidsoftware.TelegramNew
02-07 11:08:48.287 13586-13586/? D/ResourcesManager: For user 0 new overlays fetched Null
02-07 11:08:48.297 13586-13586/? I/InjectionManager: Inside getClassLibPath caller
02-07 11:08:48.357 13586-13586/? I/GMPM: App measurement is starting up, version: 8487
02-07 11:08:48.357 13586-13586/? I/GMPM: To enable debug logging run: adb shell setprop log.tag.GMPM VERBOSE
02-07 11:08:48.367 13586-13586/? W/ResourcesManager: getTopLevelResources: /data/app/ir.androidsoftware.TelegramNew-1/base.apk / 1.0 running in ir.androidsoftware.TelegramNew rsrc of package ir.androidsoftware.TelegramNew
02-07 11:08:48.387 13586-13586/? I/GAv4: Google Analytics 8.4.87 is starting up. To enable debug logging on a device run:
02-07 11:08:48.387 13586-13586/? I/GAv4: adb shell setprop log.tag.GAv4 DEBUG
02-07 11:08:48.387 13586-13586/? I/GAv4: adb logcat -s GAv4
02-07 11:08:48.447 13586-13586/? D/InjectionManager: InjectionManager
02-07 11:08:48.447 13586-13586/? D/InjectionManager: fillFeatureStoreMap ir.androidsoftware.TelegramNew
02-07 11:08:48.447 13586-13586/? I/InjectionManager: Constructor ir.androidsoftware.TelegramNew, Feature store :{}
02-07 11:08:48.447 13586-13586/? I/InjectionManager: featureStore :{}
02-07 11:08:48.447 13586-13586/? D/RelationGraph: garbageCollect()
02-07 11:08:48.447 13586-13586/? W/ResourcesManager: getTopLevelResources: /data/app/ir.androidsoftware.TelegramNew-1/base.apk / 1.0 running in ir.androidsoftware.TelegramNew rsrc of package ir.androidsoftware.TelegramNew
02-07 11:08:48.447 13586-13586/? D/ContextRelationManager: ContextRelationManager() : FEATURE_ENABLED=true
02-07 11:08:48.757 13586-13586/? D/AbsListView: Get MotionRecognitionManager
02-07 11:08:48.757 13586-13586/? E/MotionRecognitionManager: mSContextService = android.hardware.scontext.ISContextService$Stub$Proxy@affb32a
02-07 11:08:48.757 13586-13586/? E/MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@3f2451b
02-07 11:08:48.757 13586-13586/? E/MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@3f2451b
02-07 11:08:48.957 13586-13586/? D/Minikin: FontFamily bestFont == NULL, so return vacant FakedFont
02-07 11:08:48.957 13586-13586/? D/Minikin: FontFamily bestFont == NULL, so return vacant FakedFont
02-07 11:08:48.957 13586-13586/? D/Minikin: FontFamily bestFont == NULL, so return vacant FakedFont
02-07 11:08:49.007 13586-13586/? I/Timeline: Timeline: Activity_launch_request id:ir.androidsoftware.TelegramNew time:245262389
02-07 11:08:49.027 13586-13586/? D/Activity: performCreate Call Injection manager
02-07 11:08:49.047 13586-13586/? D/RelationGraph: garbageCollect()
02-07 11:08:49.047 13586-13586/? D/TelegramNew: mainline 1
02-07 11:08:49.047 13586-13586/? W/ResourcesManager: getTopLevelResources: /data/app/ir.androidsoftware.TelegramNew-1/base.apk / 1.0 running in ir.androidsoftware.TelegramNew rsrc of package ir.androidsoftware.TelegramNew
02-07 11:08:49.097 13586-13586/? D/AbsListView: Get MotionRecognitionManager
02-07 11:08:49.097 13586-13586/? E/MotionRecognitionManager: mSContextService = android.hardware.scontext.ISContextService$Stub$Proxy@3f1b83c
02-07 11:08:49.097 13586-13586/? E/MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@e75e9c5
02-07 11:08:49.097 13586-13586/? E/MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@e75e9c5
02-07 11:08:49.097 13586-13586/? I/InjectionManager: dispatchOnViewCreated > Target : ir.androidsoftware.TelegramNew.NavigationDrawerFragment isFragment :true
02-07 11:08:49.117 13586-13586/? D/Activity: performCreate Call Injection manager
02-07 11:08:49.147 13586-13586/? I/InjectionManager: dispatchOnViewCreated > Target : ir.androidsoftware.TelegramNew.FragmentMain isFragment :true
02-07 11:08:49.157 13586-13586/? I/InjectionManager: dispatchOnViewCreated > Target : ir.androidsoftware.TelegramNew.FragmentSeeChannels isFragment :true
02-07 11:08:49.397 13586-13586/? D/TelegramNewLeft: CheckLefts killed()
02-07 11:08:49.397 13586-13586/? D/TelegramNewLeft: CheckLefts Stop()
02-07 11:08:50.577 13586-13624/? I/qtaguid: Tagging socket 60 with tag b59f8cea00000000{3047132394,0} uid -1, pid: 13586, getuid(): 10177
02-07 11:08:58.507 13586-13642/? D/Minikin: FontCollection getFamilyForChar is NULL, so assign fakedFont.font = NULL
02-07 11:08:58.507 13586-13642/? E/Minikin: no font for run starting u+dbba length 2
02-07 11:08:58.507 13586-13642/? D/Minikin: FontCollection getFamilyForChar is NULL, so assign fakedFont.font = NULL
02-07 11:08:58.507 13586-13642/? E/Minikin: no font for run starting u+dbba length 2
答案 0 :(得分:0)
我发现了问题。我在BaseActivity中添加了这个代码,mainActivity继承了它:
if(!BuildConfig.DEBUG) {
Secure.CheckPckNm(this);
Secure.CheckAppSign(this);
}
如果签名无效,CheckAppSign将完成mainActivity。 我忘记了那段代码:-)。
答案 1 :(得分:0)
嗨,我在你的答案中看到你使用这个
if(!BuildConfig.DEBUG) {
Secure.CheckPckNm(this);
Secure.CheckAppSign(this);
}
但是这没用,因为黑客/黑客可以更改BuildConfig类,如果他将Debug值更改为true
此代码未执行
你应该检查调试签名