app-debug.apk does not exist on disk - android

I've looked through all tips in the other threads here, tried all proposed solutions (last thing I did was completely uninstall and reinstall Android Studio), and I still get it...
If I select "Build APK", then whenever I change the code the changes aren't put in effect in the new versions of the app... I think I'm going to give this up for the weekend...
First I had all the database errors I pointed to in the other thread (unsolved), then Android Studio started "ignoring" changes in my code (like commented lines being ran as they weren't commented), now invalidating the cache and everything else (including the reinstall) left me here...
Any thoughts?

I sorted it myself (this question was asked multiple times around here, HOWEVER it WAS NOT satisfactorily answered):
Go to "Run" - "Edit Configurations", look at the "Before Launch" field at the bottom of the window, click on the "+" sign and add the "Gradle-aware Make" option to the list, no additional text needed on the next input window (just click on "ok").

Related

Is there a way to quickly go through all the compilation errors in an Android Studio project?

My goal is to be able to use the keyboard to quickly go through all the compilation errors in a project. It is like using F2 or shift-F2 to go through errors in a single file, except not only the single file, but every file in the project.
I could even accept having to open all files with errors (or even all the files) and using shift-F2 and ctrl-F4.
The build output panel in Android Studio seems to only allow clicking via a right click menu to go to the next problem which is incredibly slow.
A problem file can be fixed, and then a build triggered with ctrl-F9 to seek to the next file, but that is also incredibly slow.
I have done some googling in an attempt to find a solution, but am only finding irrelevant results.
To me, it seems to be a simple to implement UI feature with a great quality of life improvement that should exist. Does it exist or does an issue need to be created?
I did find a way to use the keyboard to go through errors in the build panel.
CTRL-Tab-B will move focus to the build panel. Then Tab will move focus to the build output tab of the build panel. Then you can arrow over to the next problem file and hit enter to put focus in the source file at the error.
Quite a lot of key presses to go to the next error in a project.
Update: An even better way is to press alt-6!

Can't see errors/warnings in Problems view unless project is selected in Package Explorer

I can not see any errors or warnings in my Eclipse(4.4.2) unless I specifically select the project or file in Package Explorer and then go to the Problem view.
So far I tried different options in "configure contents" and "show" dialogs in the Problems view menu without success. The only time I see errors in the Problems view is if I set the options "show all" or "all errors" and then it shows every issue with every project I have, don't want/need that.
I also tried (following suggestions from other posts) closing/reopening project, Build Automatically and fix project properties... no luck.
I remember it used to be that if you had issues in a file you were currently editing you could jump straight to the Problems view and it would show you the issues for the project where that file lives, in other words the current project being edited. This is the result I want.
Android SDK manager is up to date so I am out of ideas. Appreciate any help.
Open the 'Configure Contents' menu and select the 'All Errors' (click the line don't use click the check box). You should then be able to configure the Scope of the errors on the right hand side of the dialog (such as any element in same project)

Android Studio, logcat cleans after app closes

I'm having a problem with my logcat since update 1.2 Beta for Android Studio. When I run my app it logs everything like it normally did, then I get at the point where my app crashes with the app saying: unfortunately, Game has stopped.
After a few seconds android closes that message. When that happens my logcat also gets fully cleared meaning that I barely get anytime to read the error. I did found some info about a buffer, but it seems that Android Studio doesn't have the option to increase it besides the fact that I doubt that being the problem.
Something that may be useful is that after it clears and stuff the process changes to Android.process.core and the message I get in my logcat is:
04-13 10:28:13.394 12259-12265/android.process.acore D/dalvikvm﹕
Debugger has detached; object registry had 1 entries
Edit: I did read about breakpoints, so disabled focus application on breakpoints in Settings-build, execution, deployment-debugger but it didn't have any effect.
I had the same issue, but looks more like a feature than a bug:
In AndroidStudio, the default setting for the Logcat window seems to be "Show only selected Application" (top right corner of the Logcat window)... which is looking at the log of the selected process (your current launch by default). So when your app crashes during testing, that process is gone, so the filter clears the log.
Instead, select "Edit Filter Configuration..." and set up a filter for your app, eg:
FilterName: MyApp
PackageName: com.example.myapp (<< replace with your app's package name)
...and then select that filter for future runs. This should keep the log there for you, even after the app crashes.
Switch "Show only selected application" to "No filters". This way, you can see logcat output from a process even when that process isn't running.
The downside is that your logcat will be filled with more spam from other processes.
In case of crash see the Run tab at the bottom of IDE.
You can see the crash reason in this part (even in logcat clean case).
Note: If the above trick not works try to produce a crash and immediately disconnect the mobile cable (if you use the real device for the test). you can see the error before it cleaned.
Update: If also above trick not works, try to attach and detach phone and hopefully problem solved.
Update2: If again not work, try to Invalidate catches and Restart then start debugging again.
Update3: As The last way, try to remove the app and install it again then start debugging (if you do not lose that condition you want to test)
My App was crashing and restarting. I also had some problems on reading the logcat to know what was happening. I then noticed that in the drop down menu, next to the Device dropdown it had something like "com.mypackage.myapp ('some number')" and when my app crashed there was another option that said "com.mypackage.myapp ('some number') [DEAD]". If you select the "Dead" option, it will show you the logcat of the previous instance.
Might be very late to the party but I had the same problem and solved like this:
In logcat window, top right corner drop-down menu select Edit filter configuration, on the next menu, introduce Filter name and your Package name.
Done, for me it keeps logs visible after crashing.
In Android Studio 2+
Click Run
Click Edit Configurations
In the Run/Debug Configurations window select the Miscellaneous tab
Make sure the Clear log before launch checkbox is not checked
The filter clears the log once the app gets crashed. So select "Edit Filter Configuration" and create your own custom filter with filter name. This will save the log with informations even when the app is crahed.
I'm Working with Android Studio 4.0
enter image description here
Go to Edit Configuration of your app.
Go to Miscellaneous Tab
Uncheck the field Clear log before launch.
Press OK.
It'll work..
i have faced the same issue and this is the solution :-
1- Tools --> Android --> Enable ADB Integration.
and now you can see the logcat and the crashes as normal
It is 2018 and this can still happen. Close Android Studio and reopen.
7 years later ...
I still have same issue on AS ArcticFox and nothing helps.
But I have found one workaround.
make sure this is enabled:
Then you can see your logs regardless the app is alive or not or device is connected or not. Which is great!
Still, sometimes I get this problem although some solutions work here such as restarting android studio it takes time.
Here I found how to get error message without restarting the studio
Launch the app
Be on run tab before you make your reproduce crash
Click on the content of run tab as soon as crash occurs (if you don't click on content you will lose error report)
This bug seems to be fixed with the new release of Android Studio version 1.2.2
I ran into the same problem and none of the answers could help me, until I realized my app was causing an OutOfMemoryException. That's a probable root cause as well.

Can't launch Android project from green Run icon

This always worked before but since yesterday the little green arrow (green background, white right pointing triangle) does not work. Nothing happens, except maybe once in twenty tries. I have to push the small black down facing triangle right to it and launch the project from the popup menu.
I also have a keyboard shortcut bound to the same "Run" command. Also this shortcut has the same problem. It only rare works since yesterday. Most of the times there's nothing happening at all. No output in Console.
Try this:
Clean Project -> close all files
Restart Eclipse
Right click on project -> Run As -> Android Application
Try the run button again.
Let us know the outcome.
Not sure whether is this the case or not. When you working on your XML or Manifest and you launch your application it wont really work. It will launch your xml file instead and might create an extra file in your project. Try to launch your application in an activity(Java) page.

Android application problems in Eclipse

I'm a .NET developer but I like JAVA so in my free time I play around with that. I don't normally use Eclipse but I installed the ADT eclipse plugin and Andriod SDK and I started learning and I made a new project with a TableLayout and it kinda looks good, and it runs ok on the emulator.
However... there a few things that drive me absolutely catatonic and perhaps I am doing something wrong so please help me out.
Firstly, if I change the main.xml file in whatever way, even by adding what is supposedly a correct parameter, it will start freaking out and will generate an error that just says "error" without specifying what that is, it will then generate a main.out.xml and then report an error that the main.out.xml is empty. It later won't let me delete that and will start generating a main.out.out.xml and so forth, even after I correct that original xml that caused the error.
The only way to get things going is to delete the bin folder, restart Eclipse, delete all the out xml files and then sometimes it will run the application or some other times it will start generating those 'out' files again and the loop goes on.
That way it takes hours to run a simple app even one without errors that used to run before.
Surely that was NOT how they intended it to work, is it??
Also.. there is no "Rebuild" button that will flush all files out automatically, or is it hidden somewhere? I am tired of manually deleting those automatically generated files and the build folder and all those out.xml files.
Also, while I'm at it, I also want to point out that the designer view sometimes disappears and there is nothing on earth that will bring it back, the only way is to create a new project and copy the main.xml to it and then it shows up again. Another bug?
I have the latest eclipse version:
Version: Indigo Service Release 2
Build id: 20120216-1857
If you have any clues how to get this to work, I will appreciate it!
Many thanks in advance
When you click the Run button with an XML file selected, Eclipse is running an XSL Transformation on that XML and producing the .out.xml file as the result. This is a feature of the Eclipse Web Tools feature, which you'll have if you installed the Eclipse for Java EE Developers package (it may be included in other packages, too).
As others have said above in the comments, to run your Android app, select the Project, right-click, and choose Run As > Android App. Once you've done that once, it will create a Launch Configuration that you can launch from the Run or Debug toolbar buttons (pressing the small down-arrow on the Run or Debug buttons brings up a list of Launch Configurations that you can select from, as well as an option to manage them).
There is a Preference that will make Eclipse always launch the last thing you ran or debugged, instead of trying to be smart about what is currently selected. Open the Preferences and navigate to Run/Debug > Launching; there you'll find the option under Launch Operation at the bottom of the window.

Categories

Resources