Waiting for HOME ('android.process.acore') and another error


#1

I’ve also encountered some problems when launching GeoQuiz. First of all, I should mention that I wasn’t able to follow the intructions in the book when I was creating AVD, since the only option for target was API level 20 (and not level 17). Here are some details:

Name: Nexus_API_20
CPU/ABI: Android Wear ARM (armeabi-v7a)
Target: Android 4.4W (API level 20)

Here are all details. My problem is the following. When I made the first AVD, I was able to start GeoQuiz application on it, but then “Unfortunately, GeoQuiz has stopped”. The only reason that is mentioned in posts under a topic that covers this problem are Fragments, for which I do not know what they are (yet), but clearly there are no (placeholders for) Fragments in my code (as mentioned in those posts) which was the problem there. Therefore I deleted my first AVD and created a new one (the current). Now, every time (3/3) when I choose Run As Android Application I stuck at the point

Waiting for HOME (‘android.process.acore’) to be launched…

Each time I have closed my “Nexus” after more than 20 minutes of waiting (last time after 45). When launching my first AVD the whole process took less then 10 minutes.

NEW: I’ve created another ADV with details here, but after GeoQuiz.apk is successfully installed on the ADV and I try to “Start” it, I get list of errors: here and the rest here.

My code:

activity_quiz.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	android:gravity="center"
	android:orientation="vertical" >
	
	<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>
</LinearLayout>

strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="app_name">GeoQuiz</string>
    <string name="question_text">Constantinople is the largest city in Turkey.</string>
	<string name="true_button">True</string>
	<string name="false_button">False</string>
	<string name="correct_toast">Correct!</string>
	<string name="incorrect_toast">Incorrect!</string>
    <string name="action_settings">Settings</string>

</resources>

QuizActivity.java

package com.bignerdranch.android.geoquiz;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;


public class QuizActivity extends ActionBarActivity {

	private Button mTrueButton;
	private Button mFalseButton;
	
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_quiz);
        
        mTrueButton = (Button)findViewById(R.id.true_button);
        mTrueButton.setOnClickListener(new View.OnClickListener() {			
			@Override
			public void onClick(View v) {
				Toast.makeText(QuizActivity.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) {
				Toast.makeText(QuizActivity.this,
						R.string.incorrect_toast, 
						Toast.LENGTH_SHORT).show();
				
			}
		});
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.quiz, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}

#2

Try targeting an API level below 20. You’re getting this error because you’re targeting the Android Wear API. If you’re not seeing an AVD for APIs below 20 in the AVD Manager, then launch the SDK Manager and install one of the APIs like 18 and try to create an AVD that targets this API level.


#3

Thank you so much!