1

I'm a beginner and when i ever i make an app and i test it on real phone

the first activity takes 400-900ms to start, even when it's only show a text view or a button. (just empty App)

on the same phone i have few apps (Games) from Play Store , and they work instantly! there's no 10ms delay!

so I'm wondering why is this happening to me even if i make (Empty App)

I mean seriously, why would it starts slowly with this simple code:

   public class MainActivity extends AppCompatActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);


    setContentView(R.layout.activity_main);
    Button button = findViewById(R.id.button);
    button.setText("Hello World");

   }
 }
Loving Android
  • 253
  • 5
  • 15

1 Answers1

0

The problem is that the APK you are generating is with debug property on, so this APK is considered to be in development mode that's why it will take longer to launch. You need to generate a production APK (same one you can publish on Play Store) in order to have the same launch speed as the other apps. Check this out : Sign Your APK

Yamen Nassif
  • 2,416
  • 2
  • 24
  • 48