Fixed
Status Update
Comments
rp...@google.com <rp...@google.com>
vi...@gmail.com <vi...@gmail.com> #2
Yes. The temporary workaround that #1 suggests works. Add "Gradle-aware Make" to the tasks as in screen_2.PNG . "Run APK" would fail to find the custom named APK and instead would keep looking for <projectname>-debug.apk always.
ma...@gmail.com <ma...@gmail.com> #3
Run didn't start any build without "Gradle-aware Make". Always wanted install apk, even when apk do not exists or are some changes in code.
rp...@google.com <rp...@google.com> #4
We are investigating. but it looks at this point that the most probable way this happens is because the "<option name="Android.Gradle.BeforeRunTask" enabled="false" />" element in the .idea/workspace.xml file. By default, the value should be either "enabled="true"", or the element should not be present (it is added in an "enabled" state automatically when an Android project is loaded by Android Studio). The question is then: Why is the "enabled" attribute (sometimes) set to "false" after an update to 3.1?
ma...@gmail.com <ma...@gmail.com> #5
In my workspace.xml file, all "Android.Gradle.BeforeRunTask" has enabled="true"
de...@gmail.com <de...@gmail.com> #6
For workspace.xml created prior to 3.1, there isn't any entry for <option name="Android.Gradle.BeforeRunTask" enabled="false" /". Actually there is one, but it's for <configuration default="true" type="AndroidJUnit" factoryName="Android JUnit">, not <configuration name="app" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
After opening the project in 3.1 and add "Gradle-aware Make"
<configuration name="app" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<method>
<option name="Android.Gradle.BeforeRunTask" enabled="true" goal="" />
<option name="com.android.instantApps.provision.BeforeRunTask" enabled="true" clearCache="false" clearProvisionedDevices="false" />
</method>
</configuration>
After opening the project in 3.1 and add "Gradle-aware Make"
<configuration name="app" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<method>
<option name="Android.Gradle.BeforeRunTask" enabled="true" goal="" />
<option name="com.android.instantApps.provision.BeforeRunTask" enabled="true" clearCache="false" clearProvisionedDevices="false" />
</method>
</configuration>
rp...@google.com <rp...@google.com> #7
Note: We fixed this in Studio 3.1.1 by re-adding the missing "Gradle-aware Make" task when a project is opened.
Description
Today, I updated my Android Studio from version 3.0.1 Stable to version 3.1 Stable. After update, all my Run configuration not working. All Android Run configuration has wrong "Before launch" configuration(screen_1). After add "Gradle-aware Make" all start working(screen_2).
Build: 3.1, AI-173.4670197, 201803220120, AI-173.4670197, JRE 1.8.0_152-release-1024-b01x64 JetBrains s.r.o, OS Linux(amd64) v4.13.0-37-generic unknown, screens 1920x1080Android Gradle Plugin: 3.1.0Gradle: 4.4NDK: from local.properties: 15.2.4203891; latest from SDK: 15.2.4203891; LLDB: pinned revision 3.1 not found; latest from SDK: LLDB 3.0 (revision: 3.0.4213617); CMake: from local.properties: (not specified); latest from SDK: (not found); from PATH: (not found); IMPORTANT: Please read