-1

I have developed an Android application while debugging it was worked properly and also it worked well in my phone. But after sometime it was not working ( I didn't change any code). In some phones it was working but some phones it was not working(app crashed after splash screen).

Ajeett
  • 814
  • 2
  • 7
  • 18
Kabilan
  • 83
  • 1
  • 8
  • 2
    post up error log if possible – Wini Jan 29 '20 at 14:26
  • 1
    Which Android version is your app targeting? You can find this information in the **build.gradle** file of your app module. – Rushguy23 Jan 29 '20 at 14:28
  • 1
    _"some phones it was not working(app crashed after splash screen)."_ If you have access to those phones, then [get the crash log](https://stackoverflow.com/questions/23353173/unfortunately-myapp-has-stopped-how-can-i-solve-this?r=SearchResults&s=1|853.8225). Otherwise you can consider adding [Crashlytics](https://firebase.google.com/products/crashlytics) to your app to get the crahs details. – Markus Kauppinen Jan 29 '20 at 15:19

2 Answers2

1

I dont know what specifically is not working in your case, although there are many possible candidates for why your app works on specific phones and not on others :

  1. The target android version used to develop the app does not include the one on a specific phone, which means that you could be using certain things only present in certain versions of Android. As said by Rushguy23, check your build.gradle to see what version you are targeting.
  2. The app is using a lot of data at once, and certain more beefy phones can handle the data and others can't. Images, music and videos can all be candidates in this case for why the app is crashing. If you are using a database, it would be good to use some kind of compression to store and get data from it.

Those are the main things I could see for why you are having trouble on certain phones and not on others.

Demomaker
  • 118
  • 1
  • 7
1

The best practice i have is to lover minsdk version and lint your project. Watch all warnings and made the code more clean for that warnings, or use another functions and methods that are supported on all targeted android versions. Also i recommend to refactor support libraries to androidx. And remove all deprecation warnings by usage of compat helpers. For example DrawableCompat, ViewCompat, ContextCompat, ... It will increase Your application success on most of devices. If it crash again, You can use some reporting tool like acra, or instabug & etc to get idea whats happen in Your app on affected device so far. You can also use some gradle plugins to run application on more than one instance of emulator and run tests on any android version to test compatibility issues.

BR

Milan Jurkulak
  • 557
  • 3
  • 6