应用程序已安装但未启动,并且仍在 logcat 在 android studio 中不断增加

Application gets installed but not launching and still logcat continuously increasing in android studio

我是 android 开发的新手。我正在开发一个应用程序,一切正常,但现在当我单击 运行 时,应用程序安装在 phone 中,但它没有启动。即使我的应用程序不是 运行ning,android studio logcat 也会不断增加并且日志增加得非常快,以至于我无法通过向上滚动看到错误。我立即复制了日志并粘贴到文本编辑器中并检查了错误,但我无法从中识别出任何内容。关于 phone 的其他应用程序的一些奇怪消息,我无法理解。谁能说出这可能是什么原因?我该如何解决这个问题?提前致谢。如果您需要代码或 logcat 等的任何进一步详细信息,请告诉我。

您的 Androidmanifest.xml 中需要有一个启动器 activity,我想您错过了 same.If MainActivity 是适合您的启动器 activity,它应该如下所示

<activity
        android:name=".MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>
</activity>

如果您遇到问题

Too much output to process

或者logcat日志增长的非常快,然后考虑更换USB数据cable.I在S5-mini上遇到同样的问题,但是更换数据线解决了它。