I have a strange problem. when I run my app on Genymotion with android 4.1, everything is good and Logcat works fine and shows everything. but when I run the same app on a real phone(Huawei honour 7 with Android 6), and my app gets crash, logCat does not show the reason for that crash. in the other word, log cat does not show Exceptions. can anyonehelp me?thanks
maybe be useful:
logCat After a crash:
build.gradle(module app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "my.application.id"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
....
}
Go to the File option > click on “INVALIDATE CACHES/RESTART” then a dialog box will pop up, Select the “INVALIDATE CACHES/RESTART” button. This will automatically restart and build the index of android studio.
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.
Best way to fix this to invalidate caches, may it will worked for you.
Go to FILE -> click "INVALIDATE CACHES/RESTART" then a dialog box will pop-up, Select "INVALIDATE CACHES/RESTART" button.
Android studio will automatically restart and rebuild the index.
or,
You can do the following things.
or, Look into this Logcat not showing errors from my Huawei P9 phone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With