Android: App runs on emulator but it crashes on my mobile phone

后端 未结 2 1103
轻奢々
轻奢々 2021-01-28 08:37

My app works on the emulator Nexus 5(Android 7.0, API 24) but it crashes on my mobile phone(Samsung J5 Android 5.1.1) in a precise activity when I try to open another activity w

相关标签:
2条回答
  • 2021-01-28 08:38

    I solved my problem, it was a problem of my mobile, it didn't have enough memory

    0 讨论(0)
  • 2021-01-28 08:48

    Update your Android SDK to the version of your android cellphone and in build.gradle file define the minimum and max sdk versions for your mobile.

    android {
     ...
    defaultConfig {
    ...
    minSdkVersion 14
    targetSdkVersion 24
    }
    productFlavors {
      main {
      ...
     }
     afterLollipop {
       ...
      minSdkVersion 21
    }
    }
    }
    
    0 讨论(0)
提交回复
热议问题