Android 应用程序崩溃,没有任何 logcat 或任何异常

你好,我有个很奇怪的情况。应用程序会在某个时候崩溃,但不会像通常那样崩溃。该应用程序回到以前的活动或完全退出的应用程序,没有显示对话框“不幸的应用程序关闭”和安卓工作室没有给予任何异常日志。这种行为我假设是一个崩溃... 这发生在一对夫妇的设备,这是华为 p8与棒棒糖版本(默认 kitkat)和索尼 xperia z 与棒棒糖版本(默认4.2.2)。我无法调试应用程序在所有和崩溃在所有... 在其他设备的应用程序不会崩溃或不会重新启动或不会退出,所以我不知道它有什么问题... 请你能帮助我吗?

构建可能是怪异“崩溃”选项的 gradle 文件

buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}


dependencies {
classpath 'io.fabric.tools:gradle:1.19.2'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'


repositories {
maven {
url 'https://maven.fabric.io/public'
}
maven {
url 'https://github.com/suckgamony/RapidDecoder/raw/master/repository'
}
maven {
url 'https://dl.bintray.com/intercom/intercom-maven'
}
}


android {
compileSdkVersion 22
buildToolsVersion "21.1.2"


defaultConfig {
applicationId "com.sparklingzoo.framkalla"
minSdkVersion 15
targetSdkVersion 22
versionCode 303
versionName "3.0.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}


dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'org.javatuples:javatuples:1.2'
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.loopj.android:android-async-http:1.4.7'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'rapid.decoder:library:0.3.0'
compile 'rapid.decoder:jpeg-decoder:0.3.0'
compile 'rapid.decoder:png-decoder:0.3.0'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
compile 'com.facebook.android:facebook-android-sdk:4.1.1'
compile('com.wu-man:android-oauth-client:0.0.3') {
exclude module: 'support-v4'
}
compile project(':pk-library')
compile 'com.stripe:stripe-android:1.0.0'
compile('com.crashlytics.sdk.android:crashlytics:2.2.4@aar') {
transitive = true;
}
compile ('io.intercom.android:intercom-sdk:1.+@aar') {
transitive = true
}
compile 'com.mixpanel.android:mixpanel-android:4.6.0'
//    compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.parse.bolts:bolts-android:1.2.0'
compile files('libs/AF-Android-SDK-v3.3.0.jar')
}
73336 次浏览

I had this situation too. Especially when it came to bugs in the framework, instead of coding bugs (Sometimes it were native crashes).

It helps to remove all filters from logcat, so that you can see all logs, not only the log of your app. In the upper right corner of your logcat, set the filters to "No Filters" and to "Verbose".

Logcat filter options

UPDATE: With Android Studio 3.0 the Logcat changed a bit. The Logcat window itself has no filter options anymore. Instead, if you click on the (new) Logcat tab in the lower left corner, a new logcat window is opened, but the filter options are visible in the tab itself.

I had this problem and it was to do with the emulator being offline, nothing at all happens when you hit run. I selected Wipe Data from the drop down list in the AVD manager and then it worked normally again after this.