1
我认为我的问题与adb有关。我在网上搜索了很多东西,试图用4种不同的方法关闭它,没有任何帮助。我正在使用Mac。下面是Android Studio中的运行选项卡中说,当我跑我的应用程序:Android Studio,如何处理adb错误?
06/16 16:36:06: Launching app
$ adb push /Users/melloo/Desktop/UCI/Intro-to-Mobile-App-Development-with-
Android/A2-Antoniya.Puleva/app/build/outputs/apk/app-debug.apk
/data/local/tmp/x40240.antoniya.puleva.a2
$ adb shell pm install -r "/data/local/tmp/x40240.antoniya.puleva.a2"
pkg: /data/local/tmp/x40240.antoniya.puleva.a2
Success
$ adb shell am start -n
"x40240.antoniya.puleva.a2/x40240.antoniya.puleva.a2.MainActivity" -a
android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 2983 on device Nexus_5X_API_22 [emulator-5554]
Application terminated.
和我的清单:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:launchMode="standard"
>
<activity android:name=".MainActivity"
android:label="List O'Names">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".NameListActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name = "x40240.antoniya.puleva.intent.action.ACTION_VIEW" />
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
</application>
运行应用程序时发生了什么?它会崩溃吗? Android监视器选项卡上的任何错误? –
Mateus,在模拟器上,我收到一条消息:“应用程序已停止”,如果我尝试再次运行它,则表示它一直停止。 Android监视器显示完全没有。 –
您的应用崩溃了,通常是由于您的代码中存在错误。 Android监视器什么都不显示是非常奇怪的。它应该显示来自仿真器的日志,并在收到该消息时显示堆栈跟踪错误。你可以仔细检查该选项卡中的过滤器是否正确?确保你的模拟器和应用程序被选中。 –