6

I have a LibGDX project which is made up of a core project and multiple Android/desktop projects which are dependent upon it.

I'm currently changing some code in the core project but upon manually building, cleaning, and running the changes are not being reflected when I run the project.

From my searching I feel the issue is related to Instant Run, but I cannot disable it as the checkboxes are grayed out.

enter image description here

Is my issue related to Instant Run? And how would I go about disabling it?

Deniz Yılmaz
  • 1,084
  • 9
  • 16
yesbutmaybeno
  • 1,078
  • 13
  • 31
  • 1
    Could it be already disabled since it says instant run requires gradle. When i first opened my project it was same as you but after gradle sync it turns to clickable. What do you think ? It can be gradle error. And i found same question also unanswered. http://stackoverflow.com/questions/35168753/instant-run-in-android-studio-2-0-how-to-turn-off – Deniz Yılmaz Aug 17 '16 at 21:09
  • I was thinking this just now, was wondering how to "build with Gradle". I've clicked the Sync button and it does it's thing but still unclickable afterwards. – yesbutmaybeno Aug 17 '16 at 21:12
  • It appears you were on the right track, I noticed one of the modules in the build.gradle file were commented out. Uncommenting it and then re-syncing allowed the Instant Run buttons to be clickable. Thanks for the help! – yesbutmaybeno Aug 17 '16 at 21:19
  • 1
    @FTLRalph I'm having the same problem, could you explain how you solved it, please? – Larpee Dec 08 '17 at 15:11

3 Answers3

2

it seems you need a successful build with gradle (at least up to the configuration phase) and then the checkbox gets editable.

j2emanue
  • 60,549
  • 65
  • 286
  • 456
1

On a new installation of Android Studio 3.0.1, I found that I couldn't build a project because of Instant Run and that the Enable Instant Run was forced on and greyed out so that it couldn't be disabled.

The build error was:

Error:Failed to notify project evaluation listener.

I found that doing a build from the command line fixed both the failure to build and not being able to disable Instant Run.

./gradlew assembleDebug
TTransmit
  • 3,270
  • 2
  • 28
  • 43
0

Make sure you change the Instant Run setting in a specific project. I mean you need to do:

  1. Open the specific project
  2. Right click on the file
  3. choose settings
  4. Build
  5. Instant run

For me its work

ColdFire
  • 6,764
  • 6
  • 35
  • 51
tn2000
  • 642
  • 1
  • 8
  • 13