I ran my program just fine a few minutes ago, and when I added more functionality now it is telling me "The JRE Instance Default XSLT processor does not support debugging_ Would you like to debug using the default Xalan 2.7.1 processor instead?"
I did restart Eclipse maybe that has something to do with it? :/
It's my first times writing an app so if I have to set something in eclipse each time maybe that's why? and what is it if that is the case.
Thanks!
You were in an XML file when you hit debug, I would bet. Happens to me all the time. For some annoying reason it does something entirely different that I don't understand when you do that. Delete the .out.xml that should probably have been created, open a .java file, and try to debug again. Another way is to just right-click your project and do Run As > Android Application.
Related
I really need some help with this.
I had to migrate from Eclipse to Android Studio.
I exported my project (at first time - using "export" tool, at the second time manually - same result) and everything worked great (I worked for 2 days successfully) before I tried to make an apk-file. While making an apk-file, AStudio was complaining about some things like "change your customNS to res-auto" and when I did so, it started to freeze. If it freezes it's over, I have to kill the process of AS. When I reload AS, it makes a rebuild and then deadly freezes again. I figured, the build itself doesn't hang the AS, it freezes when I try to interact with source files. Try to print just a single letter - and it's over.
I ran this project on my friend's laptop (it's more powerful than mine) and it doesn't freeze there. But I'm not sure it's really connected with the power of PC.
Please give me some advice. Thanks.
So, problem solved. I had in my file some if-else-if structure with about 50 conditions. Refactoring it solved the freezing problem.
That's probably AStudio's way of punishing those who write bad code :)
During my development under Android I saw that if I don't clean before building and running the application, it will keep some old files giving me no-sense errors since they were fixed one or two runs before.
Have you ever experienced this problem? Any idea of how to prevent it / how to clean always before running the application on Eclipse?
This is not happen always. Most of the time if you not clear the project before build won't harm the application. I clear it form time to time, mostly when I change something in xml files, but for regular app checking I don't think you have to do it and I doubt that there is any method to clear before each build.
since I updated my Android SDK today I get some strange Lint errors in my project. The activity contains amongst others a textview. Everything works fine, but if I want to change the text size of the view within the code with .setTextSize(float size), I get in other lines (and also other independent methods) errors that a call requires a certain API level. But that are calls like string.isEmpty(), which is available since API level 1.
What am I missing? And I know, I can set the text size also in the xml-file, but I want to change it during runtime.
Any ideas?
Thanks!
Best regards
Tobi
I think I got into something similar some time ago (nonsense Lint errors)...
Are you working with Eclipse?
If so, you can try the following:
Restart Eclipse
Clean your project (Project->clean...)
Click the button "Runs Android Lint..." (it's in the toolbar, between the "Virtual device manager" and the "new project wizard")
I don't remember exactly what did I do to solve the problem, I hope it works though
Good luck!
With the latest release, I've had a few times where the lint errors were just incorrect. (missing semicolon on a line with a semicolon, etc).
In such cases, you can right-click on lint error warning, or on the numberings on the left side, and select "Clear All Lint Markers".
This will allow you to compile the file once, and if that works, Lint seems to start acting normally again.
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.
I'm having a troubling problem testing some code for and Android app. My app has two parts, and activity where the user changes some settings, and a broadcast receiver that responds to SMS messages, both in the same package.
Here's the problem, I first implemented some simple code to test out the broadcast receiver and the activity, and both worked fine. But then as I tried to refine the code, I noticed the emulator wasn't picking up any of my changes. Event went so far as to uninstall the app from the emulator and try again, no luck. Then I added some extra Toast popups to my receiver, nothing, still running the old code. I know its running the old code because its sending out an SMS using a string constant that is no longer in the current code, so it should be impossible that it respond with that value.
Here's the kicker that has me confused. For fun I made a change to my activity. Ran the project from Eclipse and that change showed up! Tried to test the receiver code again, runs the old code that doesn't even exist anymore!!
How in the world can half the package update, and the other half not?
Can anyone help me out 'cause I'm about ready to lose my mind.
I had a similar problem. Changes made to classes imported from another project didn't get picked up by eclipse, but those made to classes in the current android project were.
Making a change to the current android project (inserting a blank line and deleting it) seemed to make eclipse pick up all the changes made and upload the app to the emulator.
I had this problem too, Now I found a working solution. Just follow these steps:
Run your project normally.
When emulator started, run your project again (DO NOT close the first emulator)
Then the updated application will be uploaded into emulator
I can't really be sure what happened but creating an new emulator image appeared to solve the issue.
I don't know why it happens but it's a problem I have all the time.
What I typically do is
Close the emulator
Close Eclipse
Reopen Eclipse
Clean the projects (in Eclipse, select Project -> Clean... -> Clean all projects)
Rerun the emulator
Annoying as hell but seems to work for me.
I'm having this problem too. It mostly happens when errors are entered into the code. The strange thing is if I go back to the original code, Eclipse doesn't revert to the original code. One thing that seems to help is to temporary delete the contents of a file, save, and rebuild, and then enter the contents back into the file, save, and rebuild.
How is one supposed to debug in such an environment?