Android Studio 2.3 Unknown Error - android

Has anyone faced this issue after updating to the recently launched Android Studio 2.3? Seems that this error does not affect anything and it only shows on messages. There is no stack trace with regards to it or anything. Building the APK or debugging with these errors do not affect the code in any way.
Project is using Gradle 2.3.0.
Here is my grade-wrapper.properties.

Turns out, screenLayout within each Activity's config is the culprit. I shouldn't have done that. Doing it would result in an error without any stack trace or whatsoever.

If you are using older version of Gradle, then update it by simple steps:
Go to Gradle scripts and then open the gradle-wrapper.properties and replace the distributionUrl with this:
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
Then start the Gradle sync again with a working internet connection.

Related

instant run not working and always restarting the whole app - android studio 2.3

What I have tried:
I have disabled, enabled the instant run multiple times.
I have tested the instant run on many projects.
I tried Invalidate Caches and Restart.
I tried to change on XML only, Java only, static fields, variables. all the cases restarts the whole app.
Still the instant run button restarts the app always.
The devices i use for testing are
Motorolla Moto G4 Android 6.0.1 and Samsung Galaxy s4 Android 5.1
Any solution for this problem ?
Seems like There's a bug in Android Studio 2.3(24Feb2017 Build)I have Workaround for Instant Run.
Working for me:
com.android.tools.build:gradle:2.3.0'
Not Working for me:(>2.3.0)
com.android.tools.build:gradle:2.3.1'
So You could try 2.3.0 for Project-level build.gradle
Welcome to #AndroidDev :)X)
I know it's been a long time since the question but I find myself in the same problem and I just discovered the solution:
In Gradle (Module: app)
  
buildTypes {
...
debug {   multiDexEnabled true }
}
  The mutidex was enabled in debug mode this was causing in my case the failure in instantrun at android studio 2.3.3
Just a little hint. When I switched from Android Studio 1.5 to 2.0 (stable) the new Instant Run didn't work with layout changes. I tried Run > Clean and rerun app and I solved, since that moment Instant Run works.And please refer below link.I hope it will help you out
Android Studio 2.0: Why does Instant Run not work when modifying xml layout resources?
or you can further refer below link for configuration
Android Studio 2.0 Instant Run Not Working
I also had a same problem after update "Android Studio 2.3"
Even small xml change went full install.
message : "Instant Run applied code changes and restarted the app. Static Initializer Change"
So I started to find which one made this problem from libraries I use.
and when I remove realm dependency from my code, Instant run work properly.
hmm. It's not a perfect solution. but this might be a clue.
ps - removing dependency is little bit annoying. so first time I removed realm initialize code but it is not working. only remove all realm dependency will work...
I had the same issue. For running the app its Shift+F10 for applying changes its Ctrl+F10. Try it. Hope it works.

Android studio not executing latest code

I have done some modifications to my code which upon running, Android studio behaves exactly the way it was before my changes.
As I place debug points on those new lines, I get a weird error message stating "No executable code found at line xx"
Following is a snapshot of the same. How do I resolve this issue ?
Edit: I have already tried Invalidate caches and restart, still stands unresolved.
I faced the same problem. It possible caused by AndroidStudio's new feature Instant Run. Try to stop current app, hit build->rebuild project then run app again.

Resolving conflicts found during Android Studio update

I'm getting the following error during the update of Android studio. Anyone know how to resolve it?
The patch can't update files because they are either missing or different.
Reinstall Android Studio.
I run into a similar situation, conflicts while updating Android TV! Never used that package and my intention was to remove it and update everything else if possible. After some fiddling I run the command:
[path-to-android-sdk]/tools/bin/sdkmanager --update
and after 30 minutes it or so it said Done.
Opened up Android Studio and everything appears to be updated and working!

Downgrading Android Studio cause unrecoverable error

I recently attempted to upgrade my version of Android Studio, Android build tools and the Android Gradle Plugin to 0.6.1, 19.1.0 and 0.11.1, respectively.
That turned out to be a mess. So much has changed, especially with the location of output files, that it made my project completely barf. So now I want to downgrade back to 0.5.9, when everything worked and was fine, but I can't.
I get the message:
Error:Unable to load class 'org.jetbrains.plugins.gradle.model.ExtIdeaCompilerOutput' This is an unexpected error. Please file a bug containing the idea.log file
I've seen a few bugs in the google code forums about this issue, but no mention of any workaround.
I've tried completely wiping my previous install using this post,
And recloning my repo from a place that was known to work with AS 0.5.9 and gradle plugin 0.10.0, but no luck.
So currently I'm dead in the water. Any help would be appreciated.
The same thing just happened to me. Clearing the IDE's cache solved the issue
In Android Studio
File > Invalidate caches / restart...
What finally solved this for me was uninstalling, via the instructions in this post,
How to completely uninstall Android Studio?
and then installing 0.5.9 from scratch.

Android Studio: Background task running indefinitely

After updating the Android SDK, I started Android Studio. Now its showing background task continuously running with message
Updating indices: Scanning files to index.
In this mode, it is nearly hanged and I can not work on it. Not able to find a way to stop background task. A restart of Android Studio didn't work either.
I've find out that I should use the solution of #free3dom which is the Invalidate Caches / Restart option in the File menu.
I have to do this every time I change some project file by switching branches in GIT.
And yes, Android Studio really sucks and is full of bugs...
Unplug all the phones and plug them again, it gets working. It is related to adb as stated here : https://code.google.com/p/android/issues/detail?id=172387 and a known bug that is to be fixed in the future
The indexing is triggered through inotify on Linux.
There is a limit to how many directories a single user can set watches on. If your project is large, then this limit may be exceeded, and Android Studio falls back to recursive scanning mode, which is very slow.
To fix this, add this line to /etc/sysctl.conf file:
# Increase the limit for Android Studio
`fs.inotify.max_user_watches = 500000`
Then run sudo sysctl -p.
Stopping and closing the emulators that I had running solved this issue for me on the latest version of Android Studio.
I've this problem recently and in my case I'm using a linux 64bit SO and my android studio was in a ntfs disk. Since ntfs doesn't support executable permition the file fsnotifier64 was unable to execute and android-studio fallback into a compatibility mode that is much slower. The solution was copy the android-studio folder into my home folder that was ext4 and that way i was able to set permitions.
I struggled with this issue for almost one hour, and after that found that this is the adb connection issue, you can disconnect your device once and stops all the working adb processes. This issue may get resolved.
I'm also facing this issue, I've tried almost all the methods mentioned in this post, but none of them worked. The only solution that worked for me is to upgrade Android Studio to 3.5(which is still a test version at the time of writing this answer).
This happens to me after updating the Android Gradle plugin version from (3.5.3)
to (3.6.2) and Gradle version from (5.4.1) to (5.6.4)
it solved after downgrading the plugin again
to change Android Gradle plugin version and Gradle version:
File > Project Structure > Project
reference: https://developer.android.com/studio/releases/gradle-plugin.html
In my case, it was a module circular dependency problem. It wouldn't show until I removed all the changes into all build.gradle files, then reopen it and apply the stash.
It works :)
This was happening in my project every time I added a new Activity.
So I included my R file in that class and it stopped.
eg: import com.domain.appname.R;
This fixed the problem.

Categories

Resources