I am a newbie to Android development, and am using Eclipse 3.7 Indigo on Ubuntu 11.10. I have the SDK and the ADT installed. I have two problems.
An Android project takes an awfully long time to get created.
When I restart Eclipse, all previously built Projects (even simple Hello World ones) have to be rebuilt, and this takes a really long time to build. While building the "details" dialog box shows
Loading data for Android 2.3.3
Android 2.3.3: Widgets and Layouts
then,
Building Workspace (where the progress bar seems to remain halted for eternity). At times it gets built after this. At other times, the first line in the HelloAndroid.java file shows an error, which when rebuilt yet again disappears.
So when I restart Eclipse, it takes approximately 10 minutes to get previously built projects running on the Emulator.
Any fixes to this?
Hard telling what the issue is without more information, but here are some thoughts:
Your machine may be underpowered. What OS, processor speed, RAM do you have?
If you have a very large amount of projects, or have some very large projects, then it can take a long time to build them when Eclipse starts. You can close a project (right-click the project in Package Explorer and click Close Project) so it will not be built and is not accessible until you open it later. Close projects you aren't actively working on, but may want to use again someday in the future.
The ADV (emulator) takes a long, long time to start up, yes. When you start it, make sure to select the option to start from snapshot and save to snapshot to save time starting it in the future.
And yes, you may want to reinstall everything again. Sometimes Eclipse just gets screwy.
It sounds like any of several items were improperly installed. Consequently, the directories of where your compiled libraries can't be found and must be regenerated each time. That is why it takes ten minutes or more: you're recompiling everything!
The time it will take for you to track everything down and repair the settings will be MUCH longer than the time to just do a fresh install.
Really.
Related
Not a single one of my references is working including 'system' and 'micrsosoft'. I am trying to make an android app using monogame through visual studio 2019 and I've tried repairing and reinstalling visual studio 2019 and neither has worked. My project name does have a space in it and I've attempted to change that to no success (perhaps I wasn't trying correctly). It was completely fine yesterday (08/01/2022, dd/mm/yy) and I do not believe I have done anything to cause this to happen. I am using C# if that helps.
I have had this problem before, and I was very confused as well. I believe that the solution involves checking the packages installed for that project and making sure that the correct ones are installed. If the packages are outdated in comparison with the project, there seems to be incorrect ones installed which override and mess up the default reading of the system and Microsoft namespaces, making them unrecognizable. Make sure that you have the latest version of MonoGame, and that you make a project through one of those newest templates, which should set everything up properly. I have worked with MonoGame, and I remember this happening a couple of times. Like I said, just make sure everything is up-to-date, and that the project is made with those up-to-date tools. Lastly like you said, avoid anything that could cause further problems such as spaces between any of the platform projects, etc.
The messages you are seeing are coming from an incomplete Intellisense loading.
This condition should not effect the compilation or running of the game. If the game does not run; There is something wrong in the framework or configuration files (Jump down to suggestions.)
The loading of SDK style projects, like MonoGame 3.8, is more intensive than the older .SLN files. Each of the NuGet packages is checked for updates, then loaded. Only after all of the packages are updated, downloaded and loaded, does Intellisense start to load rules beyond the base C#.
Any sort of hold-up, like network delays, or issues such as low memory, slow hard-drive access or high processor utilization, can cause delays or timeouts in the Intellisense loading process.
To make things worse, the partially loaded Intellisense is taking up many of those same starved resources parsing and accumulating non-existent errors in any open tabs.
Solutions:
Make sure you have enough RAM. On my system VS2019 takes around 3GB + the game. Anything less than 8 GB is a non-starter.
Do not have anything else open when loading VS2019. Wait for it to finish loading before opening the project. VS restores the open tabs in a project, close them all, and wait until it is settled (there are tasks in the background so wait a few minutes), then restart VS.
Some virus scanners have been known to use large amounts of resources...(I am not going there, too many risks) ...
Or use a lighter editor like VS Code.
Suggestions:
Develop and test as much of your game as possible using the Windows DX profile, since iteration times are exponentially faster. Then, when the logic is complete, create a new Android project and copy Game1.cs and all created files to the new project, changing the namespace in Activity1.cs (Android's equivalent to Program.cs) to match.
I'm trying to start out with Android programming (I'm running Mac OS X Lion). I had an old version of Eclipse and installed ADT version 20 in it, and code didn't compile properly. Fine; I hadn't done much in there, and after reading some stuff here it sounded like the easiest thing for the long run would be to put together a completely new installation.
So I downloaded the latest version of Android, with the SDK, from the Android developer Getting Started site, and ran it (in its own directory). I loaded one of my previous workspaces and it said that one wouldn't work because the ADT was version 20 and it needs 21. I figured fine, there wasn't much in there and I'd just start a new workspace.
So I started a new workspace, and here's where the real trouble came: It gives me the start screen with newbie welcome instructions but won't go any further than that. When I try to create a new Android Application Project, it goes through the menus but as soon as I click Finish I get a please-wait circular icon, and little happens. There's a line at the bottom that says "66M of 142M" - it increases slowly into the 80s and then drops back down into the 60s, endlessly. And the links provided on the welcome page (Building Your First App, etc.) don't work - I click on them and nothing happens.
Any idea what's going wrong here? Is there some cruft left over in my system from older versions, which I should delete? If so, how should I go about doing that? If not, what else might I try to get it working?
I can't comment beneath yours because of my level, but you can help Eclipse run faster by giving it more memory. Doing this speeds things up quite a bit.
As far as installations go, maybe try Google's packaged version of Eclipse + Android SDK. The whole package is available here. It's already preconfigured to work and provides eclipse with ADT installed by default. Of course, if you already have an existing Eclipse you want to modify this won't help you too much. But if you're new to Eclipse it's a good way to get started with Android development.
I am using Eclipse ADT and Git (EGit) for developing an Android app. For some reason whenever I make a change to the AndroidManifest.xml file I have to save it several times, and it seems to require more saves as time goes on. I'm now being prompted to save it over 10 times when I make a change. I confirm the prompt and then another one pops up (after about 10 seconds, during which Eclipse is frozen).
It says the The original file 'Android.Manifst.xml' has been deleted or is not accessible.
This is not correct as it is not deleted/inaccessible, haven't I just been editing it for god sake!
Is this some Git related problem? It is also taking ages between prompts to save, during which Eclipse is frozen. This is slowing down development to an unbelievably slow pace.
Is there any way to disable automatic Android Library Update when starting Eclipse?
The one related to the "Android Library Update" message shown in the progressbar at the bottom when starting Eclipse
AFAIK, there is no way to disable it, and even if there is, your projects probably would not work afterwards.
However, you can reduce the amount of time spent on this and other startup tasks. Simply close projects that you do not need to have open. You can leave the projects in the workspace, but just close them via right-clicking on the project in the Package Explorer and choosing "Close Project".
My Eclipse workspace has ~350 Android projects. It used to take a minor eternity to fire up Eclipse in the morning. I switched to keeping most projects closed, leaving open only:
stuff I am working on
all Android library projects (in case stuff I am working on, now or later, depends upon them)
stuff I opened earlier and haven't gotten around to closing again yet
I have a few dozen projects open at the moment. Now, Eclipse starts up fairly quickly.
i know that eclipse has a couple of glitches when it comes to updating your app and running it on the emulator, i have tried everything that i have found on the internet. Stopping the adb manually making a new emulator and starting it with "wipe user data" and restarting it even reinstalling all of the programs. What i have noticed is that it updates correctly until i start adding images to the drawable folder. After that it doesn't update at all. Can anybody help me its really frustrating also the pictures show up on the "graphic layout how they are suppose to it just doesn't update.
When you add images/resources to the project Eclipse sometimes (always?) doesn't realize anything changed. So then when you run the project, you are just running the last version.
A simple way around that is to change one character of code, change it back, and then run your project forcing Eclipse to recompile and upload the new project with the new resources to the device/emulator.
Do you use 9-patch images? If yes - they should be valid. Once I added an invalid 9-patch image and as a result my Eclipse failed to build the app while it had not informed me what was wrong, so I spent some long time figuring out what it could be.
Another idea - image file name should only consist of a-zA-Z_ chars. Yes, commonly used '-' (minus) char is not allowed.