Android Studio Instant Run not working - android-studio

I am trying to get Instant Run to work in Android Studio. I have A.S. 2.0 Preview 4 installed, and my Instant Run is enabled like this:
Now, I am experimenting with this in the Topeka sample app from Google (https://github.com/googlesamples/android-topeka). So, I am placing a bunch of Toasts in CategorySelectionActivity and CategorySelectionFragment, hoping that they can be instantaneously changed with Instant Run. But every time I hit the Instant Run button in A.S., it completely shuts down the app and re-installs it. It does not resume from the same activity I was on previously (as expected), NOR is it displaying the toast message like
Applied code changes without Activity restart
Does anyone know how to get Instant Run to work properly?
Thanks,
Igor

Please update Android Studio to Android Studio 2.0 Preview 8.Android Studio 2.0 Preview 8 to the canary channel, as well as a new version of the Gradle plugin: 2.0.0-alpha8. You'll want to update both; instant run in particular is only enabled when using the latest versions of both:

The solution to this problem is to update Android Studio to 2.0 Preview 8, gradle wrapper to:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
and to use this gradle dependency:
classpath 'com.android.tools.build:gradle:2.0.0-alpha8'
Instant run works now on my Mac!

Related

Where is Instant Run of Android Studio 3.5?

I cannot find Instant Run in Android Studio 3.5. The release notes only says Apply Changes is better than Instant Run for Android 8.0 or higher, but does not mention removal of Instant Run that supports older versions of Android (as low as Android 5). The tool page of Instant Run redirects to Build and run your app page. after showing the following contents briefly:
N Developer Preview users: Instant Run is currently incompatible with
the Jack toolchain. This new toolchain is required to use Java 8
language features supported by Android N. To learn more, read about
the new Java 8 language features and Jack.
We Want Your Feedback! Instant Run is currently available only in
Android Studio 2.0, and higher. We will continue to improve the
feature in subsequent releases.
If you run into any additional issues, please help by logging bugs in
our public Issues Tracker. You can create an issue via this link or by
clicking on Help → Submit Feedback directly in Android Studio.
Could anyone shed some light on this?
In android studio 3.5 instant Run is remove.
If you have a problem in app installation multiple time
Then go to => run Configuration => Installation Option
==> Default apk ==> install flag ==> -r -t ==>Apply ==> Run
Then your problem solve of instant run

Platform and Plugin Updates: A new version of Android Studio is available! (show balloon)

I am getting this in my Log cat Window from last week. What if I will update? I am little nervous if new version will be different from which i m using Android 1.5.1
After pressing "Available" in Log Cat I get
What to do now.?
Change is always good in the long run.
If the new version is a stable version,you should switch.You can check latest stable build here.
You can see this video to run 2 different versions parallely if you want to have a preview
You can see release notes to see what has been updated .
Android Studio 2.0 has instant run for builds which will save you a lot of time.
Update wouldn't change IDE drastically. You will only get newly features which are added in every updated addition.
like Android Studio v2.0.0 has Instant Run feature
Android Studio now deploys clean builds faster than ever before.
Additionally, pushing incremental code changes to the emulator or a
physical device is now almost instantaneous. Review your updates
without redeploying a new debug build or, in many cases, without
restarting the app.
Read Android Studio Release Notes.

android studio stuck on Gradle sync started . GCM google cloud messaging sync with its dependencies and plugins

I try to use GCM on my app but when I start step by step as the steps on
https://developers.google.com/cloud-messaging/android/client
I have added the dependencies and plugins as required
than I press sync on android studio
but until now it take more than one and half hour form
Gradle sync started
Gradle:Download https://jcenter.bintray.com/.............
is it normal or some error happened
if it is ok how long it will take ?
if it is not normal what should I do ?
now it stopped and wa
Warning:Gradle version 2.10 is required. Current version is 2.4. If using the gradle wrapper, try editing the distributionUrl in D:\android\STRONTAXI\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip
my android studio rework fine just
when I
delete the Gradle
from the Build menu I choose rebuild project

Downloading latest Android Studio

My current Android Studio installation (linux-64bit) is showing a pop-up saying there is a new Version of Android Studio 2.
I am unable to download the current stable of Android Studio.
The download-link (on big green button) reffers to the Terms and Conditions. If i Accept and klick the button (which is showing no text, which is also strange) it redirects me to the index page again.
Here is the index page: http://developer.android.com/sdk/index.html
Have they withdrawn the release or something? Does anybody know a direct-link?
Thank you for any help on it
You need to have a little patience and try to check for update from time to time until you'll be able to update Android Studio from within the IDE. I encountered the same issues as you but after a while it worked well.
My advise is to wait with the upgrading to 2.0 and stick with your 1.5 version because a lot of people here have problems with Android Studio 2.0 (for now it is kind of buggy, maybe later Google will fixed some issues...).
As an example of my problems with Android Studio 2.0 I've posted recently, check this: After upgrading to Android Studio 2.0, I cannot change the screen orientation in the Android emulator, but of course it is your decision to upgrade or not :) .
P.S. I'm a linux user too.
As this is entirely a new version, you will not be able to update (or upgrade) from within the app.
You will have to download the installer and install at the same location replacing your Android studio 1.5
I did the same thing and is working for me.
Regards
Vivek

Android Studio don't run app after upgrade to 1.5

I just upgraded Android Studio to 1.5 release and I try (after gradle build) to run App but the run procedure is skipped and the device chooser immediately appears. No apk file issued. Any suggestion? Is a bug?
http://tools.android.com/recent/androidstudio15preview2available
We've just released Android Studio 1.5 Preview 2 to the Canary
channel.
In 1.5 we've reworked the build+deploy flow such that instead of first
building with Gradle and then popping up the "choose a device" dialog,
we now immediately ask for a device to push the APK to. Some users
were using Run + Cancel to build an APK; we now added a separate
"Build APK" action to the Build menu for that purpose.
Hi. It is not a bug, it is a feature. Personaly I hate this change and hope I can enable this optionaly.
Good luck!

Resources