안드로이드 스튜디오 에뮬레이터로 구동시키면 Hello World!가 안나오는데 어떡하죠?

조회수 1622회

코드는 다음과 같습니다.

package com.example.[Username].hello;

import android.support.v7.app.AppCompatActivity; import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

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

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

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello World!"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

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

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

1 답변

    1. 빌드에러가 나지 않았는지 확인해주세요.
    2. Run 메뉴를 실행한후 에뮬레이터를 보고있을때 아무런 변화가 없다면 logcat 에서 exception 등 에러가 없는지 확인해주세요.
    3. 에뮬레이터 상 앱 목록에 구동하신 앱이 설치 되있는지 확인해주세요.
    • (•́ ✖ •̀)
      알 수 없는 사용자
    • 제시하신 3가지 이유에 해당되는게 전혀 없습니다ㅠ 히데짱 2018.7.2 17:50
    • Run 메뉴 실행하시고나서 빌드 후 android studio 창 최하단에 install apk... 가 나타나지 않나요? 알 수 없는 사용자 2018.7.2 17:58
    • 네 그런 문구는 안뜨네요ㅠ 히데짱 2018.7.2 18:08
    • RUN 메뉴 실행 후 - Connect devices 에서 실행중인 에뮬레이터 device 가 잡히시나요? 알 수 없는 사용자 2018.7.2 18:37
    • 아뇨. 지금 에뮬레이터가 실행되어있는 상태에서는 emulator-5554 [null] 라고 뜨네요. 히데짱 2018.7.2 18:42
    • 에뮬레이터를 끄면 Connected Devices 에는 이라고 되어있고, Available Virtual Devices에는 Nexus 5X API 24(제가 만든 AVD)라고 되어있네요. Connected Devices 위에는 No USB devices or running emulators detected Troubleshoot이라고 되어있구요. 히데짱 2018.7.2 18:43
    • 에뮬레이터를 끈 상태에서.. Run 메뉴 실행 후 Avanilable devices 에서 생성하신 에뮬레이터를 클릭하여도 에뮬레이터만 실행되고 앱은 실행 되지 않는건가요? 알 수 없는 사용자 2018.7.2 19:11
    • 네. Hello World! 는 안 나오고 잠금화면과 홈화면밖에 안나옵니다ㅜ emulator-5554 null 이라고 나오네요 히데짱 2018.7.2 19:54

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)