简体   繁体   English

Android Studio Android应用未运行

[英]Android studio android app not running

I am new to Android Programming. 我是Android编程新手。

I am using Android Studio for App Development. 我正在使用Android Studio进行应用开发。 Till some hours back I was able to create and run applications but now something annoying has started happening. 直到几个小时后,我才能够创建和运行应用程序,但是现在开始有些烦人的事情了。

This is independent of application so not providing any source code. 这与应用程序无关,因此不提供任何源代码。

Problem : When I click on run app nothing happens. 问题:当我单击运行应用程序时,没有任何反应。 Its seems as if it is not taking any action. 似乎没有采取任何措施。

Output of Rebuild Project 改造项目输出

Executing tasks: [clean, :app:compileDebugSources, :app:compileDebugAndroidTestSources]

Configuration on demand is an incubating feature.
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72220Library
:app:prepareComAndroidSupportSupportV42220Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJava
Note: C:\Users\Chetan\AndroidStudioProjects\MySongMixer\app\src\main\java\com\tgc\entertainment\mysongmixer\MainActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:processDebugAndroidTestJavaRes UP-TO-DATE
:app:compileDebugAndroidTestJava
:app:compileDebugAndroidTestNdk UP-TO-DATE
:app:compileDebugAndroidTestSources

BUILD SUCCESSFUL

Total time: 1 mins 7.729 secs

Sometimes simply restarting your adb connection with adb kill-server the adb start-server commands will work. 有时,只需使用adb kill-server重新启动adb连接,adb start-server命令就会起作用。

I had a similar problem, which took longer to resolve, I updated Android studio, and my SDK - restarted and then it worked normally. 我遇到了类似的问题,需要花费更长的时间才能解决,我更新了Android Studio,然后更新了我的SDK,然后重新正常运行。

Hope this helps 希望这可以帮助

Since this question is so vague I can't be sure that this will help but I would check your Run Configurations. 由于这个问题很模糊,因此我不确定是否会有所帮助,但是我会检查您的“运行配置”。

Make sure that package is set to "Deploy default APK" 确保该软件包设置为“部署默认APK”

Make sure that Activity is set to "Launch default Activity" 确保将“活动”设置为“启动默认活动”

Make sure that Target Device is set to "Show chooser dialog" or the appropriate option for your runtime. 确保将目标设备设置为“显示选择器对话框”或适合您的运行时的选项。 Also, if you are using Emulator instead you should make sure that your emulator did not get corrupted and that it's properly set. 另外,如果您使用的是仿真器,则应确保仿真器未损坏且已正确设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM