Java 安卓工作室Logcat赢得';应用程序崩溃时不显示stacktrace

Java 安卓工作室Logcat赢得';应用程序崩溃时不显示stacktrace,java,android,android-studio,gradle,android-logcat,Java,Android,Android Studio,Gradle,Android Logcat,我刚刚用3.1.1重新安装了Android Studio,我最初的问题已经解决了,但是,现在我在logcat中看不到我的错误。我在logcat设置中选择了无过滤器,但它仍然没有显示它们。 这是我的应用程序级渐变文件 apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.akhilsukh01.earthq

我刚刚用3.1.1重新安装了Android Studio,我最初的问题已经解决了,但是,现在我在logcat中看不到我的错误。我在logcat设置中选择了无过滤器,但它仍然没有显示它们。

这是我的应用程序级渐变文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.akhilsukh01.earthquakepreparednessproject"
        minSdkVersion 22
        targetSdkVersion 27
        versionCode 7
        versionName "1.6"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support:design:27.1.1'
        implementation 'com.android.support:recyclerview-v7:27.1.1'
        implementation 'com.android.support.constraint:constraint-layout:1.1.0'
        implementation 'com.android.support:support-v4:27.1.1'

        implementation 'com.rengwuxian.materialedittext:library:2.1.4'

        implementation 'com.google.firebase:firebase-core:15.0.0'
        implementation 'com.google.firebase:firebase-messaging:15.0.0'
        implementation 'com.google.firebase:firebase-database:15.0.0'
        implementation 'com.google.firebase:firebase-storage:15.0.0'
        implementation 'com.google.firebase:firebase-appindexing:15.0.0'
        implementation 'com.firebase:firebase-client-android:2.5.2'

        testImplementation 'junit:junit:4.12'
        implementation 'com.android.support.test:runner:1.0.1'
        implementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    }
    buildToolsVersion '27.0.3'
    productFlavors {
    }
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

dependencies {
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:gridlayout-v7:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'

    implementation 'com.google.firebase:firebase-messaging:15.0.0'
    implementation 'com.google.firebase:firebase-appindexing:15.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.1'
    implementation 'com.google.android.gms:play-services-maps:15.0.0'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.1'
        classpath 'com.google.gms:google-services:3.2.1'
        classpath 'io.fabric.tools:gradle:1.25.2'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://maven.google.com" // Google's Maven repository
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
这是我的项目级渐变文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.akhilsukh01.earthquakepreparednessproject"
        minSdkVersion 22
        targetSdkVersion 27
        versionCode 7
        versionName "1.6"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support:design:27.1.1'
        implementation 'com.android.support:recyclerview-v7:27.1.1'
        implementation 'com.android.support.constraint:constraint-layout:1.1.0'
        implementation 'com.android.support:support-v4:27.1.1'

        implementation 'com.rengwuxian.materialedittext:library:2.1.4'

        implementation 'com.google.firebase:firebase-core:15.0.0'
        implementation 'com.google.firebase:firebase-messaging:15.0.0'
        implementation 'com.google.firebase:firebase-database:15.0.0'
        implementation 'com.google.firebase:firebase-storage:15.0.0'
        implementation 'com.google.firebase:firebase-appindexing:15.0.0'
        implementation 'com.firebase:firebase-client-android:2.5.2'

        testImplementation 'junit:junit:4.12'
        implementation 'com.android.support.test:runner:1.0.1'
        implementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    }
    buildToolsVersion '27.0.3'
    productFlavors {
    }
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

dependencies {
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:gridlayout-v7:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'

    implementation 'com.google.firebase:firebase-messaging:15.0.0'
    implementation 'com.google.firebase:firebase-appindexing:15.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.1'
    implementation 'com.google.android.gms:play-services-maps:15.0.0'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.1'
        classpath 'com.google.gms:google-services:3.2.1'
        classpath 'io.fabric.tools:gradle:1.25.2'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://maven.google.com" // Google's Maven repository
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
我知道在应用程序级别的gradle文件中有许多重复项,但删除其中任何一项都会产生我无法修复的错误(因为日志)。它在我使用Firebase Crashlytics时起作用,但如果构建失败,我也无法删除它。我还希望您能帮助我清理gradle文件并删除不必要的Firebase实现

我在日志的末尾看到了这个

read: unexpected EOF!
编辑1]这是运行工具栏的输出

04/19 14:15:55: Launching app
$ adb install-multiple -r -t -p com.akhilsukh01.earthquakepreparednessproject C:\Users\akhil\Documents\Apps\EarthquakePreparednessProject\app\build\intermediates\split-apk\debug\slices\slice_4.apk 
Split APKs installed
$ adb shell am start -n "com.akhilsukh01.earthquakepreparednessproject/com.akhilsukh01.earthquakepreparednessproject.IntroHome" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Waiting for process to come online
Connected to process 5201 on device oneplus-one_a2005-ad12fad1
EDIT2]好的,我在模拟器上运行了我的应用程序,一切都很好。我已经把问题缩小到我的手机。我认为这是因为Studio一次接收的数据太多而导致错误。更具体地说,就是这个


但我仍然无法修复它。

您使用多个设备吗?如果是这样,您可能需要更改logcat左上角的输出设备。编辑:实际上,仔细想想,试着选择logcat最底部的“run”选项(旁边有绿色播放按钮的选项)“在崩溃期间,它没有改变,我已经更新了我的帖子以显示输出。@Sukhthrankar对此表示抱歉,我的建议是错误的。我的logcat窗口弄错了。你是否尝试用特定的包名筛选你的logcat?是的,我尝试过。你认为这与此“读取:意外EOF!”有关吗?”在部分日志的末尾