Android Studio는 장치에서 응용 프로그램을 실행할 수 없습니다. "프로세스 대기 중 : "에 붙어 있습니다.

StackOverflow https://stackoverflow.com//questions/24043149

문제

삼성 갤럭시 S4에서 신청서를 디버깅하려고 할 때이 출력을 얻을 수 있습니다.

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"
pkg:/data/local/tmp/org.intracode.contacts
Success


Waiting for process: org.intracode.contacts
.

응용 프로그램을 실행하지 않고 "프로세스 대기 대기"메시지에만 있습니다.나는 안드로이드 개발에 새로운 것이고, 내가 누락 된 것이 있습니까?

fyi, 나는 전에 에뮬레이터에서 응용 프로그램을 시작할 수 있었지만, 이것을 시도한 후에 에뮬레이터로 되돌아 가면 동일한 "프로세스 대기 대기"메시지가 나타났습니다.

여기 내 manifest.xml 파일 :

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

<application
    android:debuggable="true"
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="org.intracode.contacts.MainActivity"
        android:launchMode="standard"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
.

여기에 내 유일한 Java 파일이 있습니다.

package org.intracode.contacts;

import android.support.v7.app.ActionBarActivity;
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;

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

        nameTxt = (EditText) findViewById(R.id.txtName);
        phoneTxt = (EditText) findViewById(R.id.txtPhone);
        emailTxt = (EditText) findViewById(R.id.txtEmail);
        addressTxt = (EditText) findViewById(R.id.txtAddress);
        TabHost tabHost = (TabHost) findViewById(R.id.tabHost);

        tabHost.setup();

        TabHost.TabSpec tabSpec = tabHost.newTabSpec("Creator");
        tabSpec.setContent(R.id.creator);
        tabSpec.setIndicator("Creator");
        tabHost.addTab(tabSpec);

        tabSpec = tabHost.newTabSpec("List");
        tabSpec.setContent(R.id.tabContactList);
        tabSpec.setIndicator("List");
        tabHost.addTab(tabSpec);

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

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

            }

            @Override
            public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
                addBtn.setEnabled(!nameTxt.getText().toString().trim().isEmpty());

            }

                @Override
                public void afterTextChanged(Editable editable) {

            }
        });
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {

        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, 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);
    }

}
.

감사합니다

도움이 되었습니까?

해결책

udpate : 나는 당신의 문제를 발견했다고 생각합니다.매니페스트를보고있는 후에, 하나의 이상은 내가 다른 곳을 찾지 못했다는 것을 발견했습니다.

    android:launchMode="standard"
.

이것은 문제와 관련이있는 것으로 보이며, 이것으로 보는 첫 번째 눈부신 문제입니다.그것을 제거하십시오, 작동하는 경우 행복을 느끼고, 답을 수락하십시오 :).변경 사항이 통합되었는지 확인하기 위해 프로젝트를 재구성하십시오.

old : 나는 이것이 Android 매니페스트에서 활동이 올바르게 등록되지 않은 문제라고 생각합니다.나는 그것이 발사 과정인지 확인할 것입니다.

자세한 정보를 얻으려면이를 APK로 내보내고 디버거를 무시하고 장치에서 직접 실행합니다.이 테스트를 수행하면 디버깅 가능을 해제하십시오.물론 다른 해결책이 작동하지 않고 문제에 대한 더 많은 정보를 수집하고 싶다면이 작업을 수행하십시오.

다른 팁

"파일"-> "캐시 / 재시작 무효화"는 나에게 매력처럼 작동했습니다.

SDK 버전으로 업그레이드 한 후 동일한 오류가 발생했습니다.'com.android.tools.build:gradle:1.0.0-rc2'에서 내 build.gradle을 'com.android.tools.build:gradle:1.0.0'으로 업데이트하고 캐시 / 재시작 무효화, 다시 작동합니다.

Android Studio, Run-> 구성 편집 기본 활동 시작을 선택합니다.

그렇지 않으면 응용 프로그램을 시작하는 데 괴롭히지 않습니다.

일부 폴더 및 Android Studio 쇼 - "프로세스를 기다리는 중"에서 프로젝트를 가져 오는 경우, 이것은 나를 위해 일했습니다.프로젝트를 C : \ Users [계정] \ androidStudiOprojects로 복사 (이 경로는 다른 사용자가 다를 수 있으며) 프로젝트를 가져온 다음 프로젝트를 가져 왔습니다.

이 작업을 수행하기 전에, 나는 kill-start 서버, 봉지를 뽑고 안드로이드 기기 등에서 USB 테 더링 모드를 꽂아두고, 그 중 누구도 나를 위해 일하지 않았습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top