简体   繁体   English

Android工作室什么都不做

[英]Android studio doing nothing

I was using android studio 1.4 and just switched to the 1.5.1 but then I experience some issue.我使用的是 android studio 1.4,刚切换到 1.5.1,但后来我遇到了一些问题。 When I try to launch my app I can see android studio building the gradle and doing something, but I manage to launch the app only when my android studio session is new.当我尝试启动我的应用程序时,我可以看到 android studio 正在构建 gradle 并正在做一些事情,但只有当我的 android studio 会话是新的时,我才设法启动该应用程序。 Alias if I fix a bug in my app then want to restart, then android studio is building the gradle, doing I dont know what and then nothing is happening...别名,如果我修复了我的应用程序中的错误然后想重新启动,然后 android studio 正在构建 gradle,我不知道做什么然后什么都没有发生......

I tried real phone and simulator, same issue.我试过真机和模拟器,同样的问题。 Below is my launch config下面是我的启动配置在此处输入图像描述

Any idea what I am missing here?知道我在这里缺少什么吗?

Thanks谢谢

I think the cause is your workspace configuration.我认为原因是您的工作区配置。 You can try to close project then open the project again through opening the project file using "Open an existing Android Studio project" option instead of clicking the recent projects... Then Clean project and then Rebuild project afterwards.您可以尝试关闭项目然后通过使用“打开现有的 Android Studio 项目”选项打开项目文件再次打开项目,而不是单击最近的项目...然后清理项目然后重建项目。 Tell me if this works.告诉我这是否有效。

I found a way that looks to work so far到目前为止,我找到了一种看起来可行的方法

1) I remove that "Gradle-aware make" config from the launch script and leave it empty 2) I do my launch in 2 step: first I build an apk via Build->Build apk 3) Then I launch my configuration that is basically just installing this new apk on the phone. 1) 我从启动脚本中删除了“Gradle-aware make”配置并将其留空 2) 我分两步进行启动:首先我通过 Build->Build apk 构建一个 apk 3) 然后我启动我的配置基本上只是在手机上安装这个新的 apk。

No idea why the whole operation do not want to be done in one go, but doing this way so far it works quite well.不知道为什么整个操作不想一次性完成,但到目前为止这样做效果很好。

Thanks谢谢

I faced the same issue while making a build for android in react-native project I researched and found out this error occurs in 3.xx versions only my android studio version 3.6.1我在 react-native 项目中为 android 构建时遇到了同样的问题我研究并发现这个错误发生在 3.xx 版本中只有我的 android studio 版本 3.6.1

did the following steps to fix the issue: 1) run > edit configuration > (at bottom) before launch: Gradle-Aware make first, 2) removed it 3) add it back while adding it will ask select Gradle task leave it empty.执行了以下步骤来解决此问题:1) 运行 > 编辑配置 >(在底部)启动前:Gradle-Aware 首先制作,2) 删除它 3) 添加回来,同时添加它会询问选择 Gradle 任务将其留空。 hit ok 4) restart your android studio and load the project from option Open existing project not from recent projects to reflect the setting,点击确定 4)重新启动你的android工作室并从选项加载项目打开现有项目而不是来自最近的项目以反映设置,

also, make sure your manifest file doesn't have any closing tag or unclosed comment pending另外,请确保您的清单文件没有任何结束标记或未结束的未决评论

after the restart, it will start working!!重新启动后,它将开始工作!

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

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