awebberley awebberley - 2 months ago 21x
Android Question

Android Studio can't run application on device: stuck on "Waiting for process: <project>"

When trying to debug my application on my Samsung Galaxy S4, I get this output:

Waiting for device.
Target device: samsung-samsung_sgh_i337-8c8aa2c7
Uploading file
local path: C:\Users\awebberley\AndroidStudioProjects\Contacts\app\build\apk\app-debug-unaligned.apk
remote path: /data/local/tmp/org.intracode.contacts
Installing org.intracode.contacts
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/org.intracode.contacts"

Waiting for process: org.intracode.contacts

It just stays on the "waiting for process" message without running the application. I'm new to android development, is there something I'm missing?

FYI, I was able to launch the application in an emulator before, but after I tried this and went back to the emulator, the same "waiting for process" message appeared.

Here's my manifest.xml file:

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

android:theme="@style/AppTheme" >
android:label="@string/app_name" >
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />

And here's the my only java file:

package org.intracode.contacts;

import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TabHost;
import android.widget.Toast;

public class MainActivity extends ActionBarActivity {

EditText nameTxt, phoneTxt, emailTxt, addressTxt;

protected void onCreate(Bundle savedInstanceState) {

nameTxt = (EditText) findViewById(;
phoneTxt = (EditText) findViewById(;
emailTxt = (EditText) findViewById(;
addressTxt = (EditText) findViewById(;
TabHost tabHost = (TabHost) findViewById(;


TabHost.TabSpec tabSpec = tabHost.newTabSpec("Creator");

tabSpec = tabHost.newTabSpec("List");

final Button addBtn = (Button) findViewById(;
addBtn.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Toast.makeText(getApplicationContext(), "Your Contact has been created!", Toast.LENGTH_SHORT).show();

nameTxt.addTextChangedListener(new TextWatcher() {
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {


public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {


public void afterTextChanged(Editable editable) {


public boolean onCreateOptionsMenu(Menu menu) {

// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(, menu);
return true;

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 == {
return true;
return super.onOptionsItemSelected(item);




UDPATE: I think I found your problem. After looking at the Manifest, the one anomaly I found that I have not found anywhere else is the line about the Android launchmode.


This seems to be related to the problem and is the first glaring issue that I see with this. Remove it, if it works, feel happy, accept the answer :). Make sure you rebuild the project to ensure that the changes are incorporated.

OLD: I think that this is a problem with the Activity not being registered correctly in the Android Manifest. I would make sure that it is the launch process.

Just to get more information, I would export it to an APK and then run it directly on the device, bypassing the debugger. If you do this test though, make sure you turn debuggable off. Of course do this if the other solution doesn't work and you just want to collect more information about the problem.