Phone is there but not showing the app


#1

Hi, need some help here. I successfully followed chapter 1 and everything worked fine except at the end of the chapter after creating the AVD EMULATOR to run the app.Android Studio said build successful but the phone is blank, not showing the app, the phone just said ANDROID. I read a similar topic before posting this one but my issue is not the same. bellow is my code.

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="24dp"
    android:text="@string/question_text"/>


<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal">



 <Button
    android:id="@+id/true_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/true_button"/>


 <Button
    android:id="@+id/false_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/false_button"/>
</LinearLayout>

package com.bignerdranch.android.geoquiz;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
private Button mTrueButton;
private Button mFalseButton;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);


    mTrueButton = (Button) findViewById(R.id.true_button);
    mTrueButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //does nothing yet but soon
            Toast.makeText(MainActivity.this,
                    R.string.correct_toast,
                    Toast.LENGTH_SHORT).show();

        }
    });
    mFalseButton= (Button) findViewById(R.id.false_button);
    mFalseButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //does nothing yet but soon
            Toast.makeText(MainActivity.this,
                    R.string.incorrect_toast,
                    Toast.LENGTH_SHORT).show();

        }//end of public void
    });//end of setOnClickListener
}

}

Thanks in advance .


#2

I see problems like this occasionally. I recommend re-creating your emulator in the AVD manager. You may want to try using a different version of Android when recreating it.

I’m not sure why this sometimes happens. It could be a bug in the emulator or it may have something to do with your computer. Sometimes you just have to play around with the emulator settings to get it to work.


#3

chuflasky

hello my friend
may be i know some thing . your emulator is so slow and even doesn’t show your first page of the mobile .
and you are not steel excited .
but the work you should do :
go to your bios of your lap top or computer then enable some thing refers to the “virtual” find this word in it
after that install haxm that is in your sdk (go to place where your sdk is) >extras>google i think those parts should be and try to install it . then in setting of your virtual machine again choose a "system imagex86 or x64 " then the other english wise written things.


#4

your emulator is slow so why do you don’t use the virtual memory of your lap top ?
emulator and android studio both are a really hard works for running in computers .
adding my sdk was 20 gigs i think in future we will work with thrabytes “TB”.


#5

My droid4x emulator is not working poperly, tried exporting from pc still facing the same issue on my asus laptop.

With Regards,
Xexukulu https://dltutuapp.com/tutuapp-download/
https://showbox.run/


#6

i solve the problem by installing intel X86 emulator acelerator(HAXM installer). go to sdk tools and once check on the check box choose to install. If you still having trouble you might need to install it directly to your machine. is probably not install in your machine. To do that you have to turn on bios on you machine then navigate to the folder where your SDK is install and go to c:\users\user\local\sdk\extras\intel\Hardware_Acelerated_Execution_maneger and run intelhaxm-android.exe. There are some good tutorials on this issue.