android studio 应用程序无法在模拟器上运行

时间:2021-05-27 06:55:04

标签: java android xml android-studio

这是我第一次使用 android studio,非常感谢您的帮助。我尝试在模拟器上运行我的应用程序,当模拟器运行平稳时,应用程序没有出现在它上面,当我运行应用程序时,它只是说 Gradle build finished 并停止。我很确定问题出在应用配置上,但我之前没有经验。

我的 androidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.mobileapp">

    <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>

</manifest>

如果需要更多信息,请询问我,我会编辑问题

2 个答案:

答案 0 :(得分:1)

build 不是在 Android Studio 上安装程序

首先确保您的模拟器在 Android Studio 中可用。

我提供了一张图片作为提醒。

reminder

答案 1 :(得分:1)

您可以尝试在真正的安卓设备上运行。进入开发者设置。打开调试并将您的设备连接到计算机。当您在 android studio 上单击开始时,它将打开。