Began to write a game on Android, already there is something. But this something normally works only on my own phone and on the emulator on the computer, and on the other devices that one does not work, then another. Although nothing difficult in the game is used, and test for the rules. android phones. Tell me what to do or how to search this problem on the Internet? On the Internet I can not find for some reason.

UPD: GUYS !!! I can look for errors and fix them, I just thought that you could follow some tips, recommendations, and so on, so that the application worked without bugs on 97% of the phones , and not to test (or test automation) on a huge number of phones, considering that with the amount of code, for example, tens of thousands of lines, these bugs can be very much on various phones, which are also very much !!!

  • 12
    Search for any problem according to glassraces (if any). How exactly does not work? Does not start? not installed? Is it painted? Does the phone go into reboot? In Narnia? To the store for bread? Flies into space, explore distant planets? - Vladyslav Matviienko
  • one
    @Etki, why the whole thing? Enough problem areas, as is done with JS or PHP. Although it may be a little harder in java ... @argamidon, a person learns =) I, too, once was not a model of the right questions (not that now a pro :)), but experience comes with time. - user31688
  • one
    People, I know how to debug !!! I just thought that it was possible to write applications in a normal way, so that it worked on 99% of phones, and not so that it worked on several phones, but in order to work on all the others, it was necessary to test! For testing an application in tens of thousands of lines on at least 10 phones in order to find ALL bugs, and then putting the application into the market is just hard, but it’s only 10 phones, and putting the application in the market anyway will get a bad rating for bugginess !!! I repeat: I know how to correct mistakes, this is not the question !!! - Aftorik
  • one
    Java - write once, debug everywhere! - arg
  • 2
    @argamidon is too fat. Here the trouble is not in Java, but in phone vendors. - Suvitruf

4 answers 4

That the application worked without bugs on 97% of phones, and not to test

God be with you, sir!
Without testing it is impossible, you will catch the main errors yourself, and you will be testing bug reports on a huge number of phones , this is how they all live.

There are rules that only help to avoid critical errors, but no more.
This is something like "Comment the code correctly, ie, use JavaDoc or analogs" and "Avoid the% something% construction, because it is dangerous and unpredictable!".

  • @TheDoctor, Ooooh ....: C Very, very, very sorry ... And really there are no topics anywhere with at least some advice about errors that occur on some phones and do not occur on others? Well, or something that can help people like me (and indeed everyone)? But in any case, I will not give up! - Aftorik
  • 2
    @Aftorik, never give up! You know the truth of life: "The programmer directly writes code only 20-30% of the time, the rest is for debugging" (I don't remember exactly, but it doesn't matter)? - user31688
  • @TheDoctor, yes, I know not by hearsay, but I still thought that at least in programming for android it would be like in UPD. After all, for example, in C ++ applications, Delphi for Windows, this is the place to be not just in 97% of devices, but in 99.99% of cases! Can you tell me: IDEA is better in this regard than Eclipse? - Aftorik
  • By the way, on the main models you can check yourself through AVD (although it is unlikely that the vehicle did not know about it, but everything can be). - user31688
  • That's because of this, I got off the android. Complete nonsense with compatibility and portability. - arg
  1. To get started, read the Android Device Compatibility Guide - there are general guidelines for how to write a compatible application.
  2. Create several different emulators with a sight for different versions of Android and test under them. I usually have 3 of them: GingerBread (API = 10), ICS (API = 14) and KitKat (API = 19).
  3. Notice under which API you build the application. It happens that people collect under LolliPop and try to run under GingerBread - it will start, of course, but if you used LolliPop or ICS features that are missing under GingerBread, then the result is clear (most likely this is what happens to you). Launch a wizard under Android Studio (in my opinion, called code analysis), which looks for calls to API methods that do not match the minSdk manifest.
  4. If there are any classes and methods that are not supported by your minSdk - then you will have to dive into the depths of the Android Support Library - the lesson is not the most pleasant, but necessary.
  5. And, of course, LogCat + debugger + ACRA is our everything.

And yet: trying to maintain API Level <10 (below GingerBread) is pointless. It is not worth it.

    @Aftorik if you don’t want to upload the code here, or you can’t locate the problem yourself, then I’ll offer you to tie the ACRA library to your android game. Even if the program crashes, ACRA will still create a stackrack and write it to a file or send it to an email (if, of course, it is configured).

    • one
      @Aftorik, I recommend Crashlytics. With ACRA, you also need to configure hosting for it. - Lucky_spirit
    • @argamidon, @Lucky_spirit - thanks for the advice, but read the UPD, please. That's not the question - Aftorik

    Found one IDE that allows you to do what I wrote about - Delphi from Embracadero (XE5, XE7, etc.). Here is the video for the correct installation (see required): Video for the correct installation of Delphi XE5 . On it, applications are written in the same way as window applications for Windows on Delphi, but it runs on android and everything works everywhere is identical (at least according to my modest tests on 5 phones). True, I can not vouch for the wide opportunities, but it is good for simple applications.

    Of the minuses - more weight apk-file (> 8 MB for the simplest application).

    Of the benefits yet - the absence of any unknown errors during development. In general, the development took place like clockwork and absolutely no problems.