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.
Related
I did not change anything in my code, nor in the grade file, but I clicked on the update gradle notification android studio gets from time to time. I am not sure what the problem is but suddenly the IDE does not recognize some functions anymore, like String methods
also this icon changed:
My old project runs, but when I create a new project it won't work it says:
Error running 'app': Default Activity not found.
Help would be much appreciated.
I had the same issue I tried closing android down and restarted it up again and it started working, couldn't tell you why it happened though.
Try cleaning your project and rebuilding it from the Build Option. I have experienced this a lot of time as well. This works for me. As to why it works, I am not sure it. Hopefully someone would soon pitch in.
Go to C:\Users\{user}\.AndroidStudio4.0\system
and delete the caches folder.
Tried a lot of things I found online, but only this worked.
I have been using Android studio for a long time, yet never understood what are the processes that Android studio runs at when we load a new project via File>New or File>Open. We just load the project and have to wait for so many minutes before the android studio completes those processes (I know that we can still click on file names and editor would open them, but i have observed the android studio will still lag until all those processes are completed)
However I don't know how, recently My Android studio started behaving differently. I don't know what i did, But every time i created a new project, or loaded a previous one, it would show a message like this:
This was very good for me, because even when i don't click the try again
button, I am still able to access all files and without any lag, thereby removing a need for external file editor. I feel this was some bug in gradle or cache handling that got fixed when i uninstalled AS and updated to AS 3.5 .
So is there a way to manually run all those build and indexing processes, instead of Android Studio just running them automatically?
UPDATE:
I think i was not clear before. I want that error to occur . Meaning I want to have a control over when the building process starts. Also, I am NOT having any error as of now, all my projects are working fine.
Look for highlighted warnings in you Gradle file, you may need to update some things and then sync again.
You could also try to clean and rebuild your project.
You can also File->Invalidate Caches / Restart if none of the above work.
If none of the above work, please provide more details on what warnings/errors you get.
When version conflict in gradle file, it cant be able to build and sync the project.There may be show "Unsupported Modules Detected: Compilation is not supported for following modules”. Fix them too
I'm currently using Android Studio 3.0.1 and I've encountered this error. I've tried a lot of ways such as uninstalling and reinstalling HAXM, and even downgrading the API from P to 5.1. This error appears twice in my logcat, and I'm unable to solve it.
There were no issues in the building of my application, and when I run the app, I keep getting a message
App has stopped working
What can I do to undo this problem?
Edit 1:
I had checked the logcat as directed and found that there were some attributes that were causing an issue. The attribute that was causing trouble was <info.hoang8f.widget.FButton/> tag, and I tried replacing it with the normal <Button/> tag. According to this tag, I tried to change a few things in only one XML file. It became too confusing for me that when I tried to revert back to what I had previously done, I ended up with 17 errors.
To get rid of the errors, I tried the following:
Clean Build my Project
Invalidate Caches/Restart
Completely check my project to see if there were any other changes I had made
I've tried to find out my errors but I'm a little helpless.
I've attached the required images. I'm a newbie, really sorry if this doubt is silly.
xmlns:app="http://schemas.android.com/apk/res-auto" namespace never used
Warnings over attributes such as shadowEnabled, shadowHeight and cornerRadius
17 errors caused after trying to revert back to old project methods
Steps you can perform to solve the issue
Invalidate Android studio cache and restart it.
Enable Haxm from bios and also from window features.
Changing the Target from "Open Select Deployment Target Dialog" to "Emulator" in "Run/Debug Configurations".
Try installing Geny Motion instead of using default emulator.
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.
Last night I updated my android studio to 0.5.3 and since than i am getting this error message whenever I am trying to generate a signed-apk. It does not occur when I am just running the project over android studio.
I tried rebuilding, cleaning project, restarting android-studio, reimporting the project, no success. I am pretty desperate right now
EDIT: i found out that actually debug-unaligned is not generated... But why is that? And why do i need to generate it if i am just trying to sign the app
In 0.5.3, we tried to speed up the build process by not having it do a full build to an APK except when it needs to, but we missed some cases where it needs to.
You can follow progress in https://code.google.com/p/android/issues/detail?id=67948 but in the meantime you can work around it by running the assembleRelease task, either from the command line or from the Gradle tasks view: