Eclipse automatically switches to alternative layout files - android

I have two layout files, one located under /layout, and one under /layout-sw550dp. When I choose to open one of them, Eclipse will automatically open the other file (which by itself would be acceptable). However, when I attempt to edit the default layout file, Eclipse will repeatedly switch to the sw-550dp file after about a second, which is incredibly annoying.
Sometimes the switching stops after a few attempts, and other times it continues seemingly forever. Could anyone shed some light on whether this is a bug or feature, and if there are any ways to disable this behaviour? I am using Eclipse 4.2.1 with the Android extras installed.
UPDATE
The switching appears to only happen when 'Loading Data for Android X.X' is displayed in the status bar. S a workaround if anyone else is experiencing this is to simply wait until this finishes loading (although it's hardly ideal)

Related

My SimCity BuildIt instance in Nox will not load past Android start screen after computer froze as I was preparing to save game progress/hard shutdown

I had finished a Contest of Mayors in SimCity BuildIt on Nox App player 7.0.5.0, instance NoxPlayer"0" (circled in pic) and had clicked on the Tools icon in the game to go to Google to save my progress when the computer froze up. This had never happened to me before. I waited for 5 to 6 minutes and when the computer did not unfreeze I forced a restart. The computer booted up normal, no error messages or Blue Screen Of Death. I waited for full startup and went to Nox to finish the game save progress.
Nox started the instance with no problems getting to the initial load bar of 100% then Android is starting appeared counted for about 10 seconds and then the Android logo appeared on the screen and stayed(pic #2), it did not progress to showing the apps that are loaded on that instance. The logo is not frozen because the highlight and shadow rotate across the logo. It just appears to be looping. Need to figure out how to get Android past logo and fully started.
These are the things I have tried so far to no avail.
1. Restart the instance, no change.
2. Close and reopen the instance, no change.
3. Close and reopen the multi-instance manager, no change.
4. Shut down (properly) and restart the computer, no change.
5. Installed previous version of Nox (7.0.3.5), overwrite, no change. Reinstalled Nox (7.0.5.0),
problem still there.
6. Loaded each of the other 5 instances I had created and no Android hang up. Decided to try a
little experiment to see how limited or extensive this hang up was.
7. I backed up instance "0" and imported it into a new instance and tried to load instance(5)
Noxplayer(1) and to my unsurprise this instance hung up on Android starting same as the other
instance.
My deduction is the problem is in the file information for the instance, because it followed
the back up and import to new instance. None of the other instances have the Android hang up,
so it must or might be restricted to the instance and not the whole Nox player app.
I believe Android has a broken or missing piece of code or file that would complete the loading function and move the instance forward to loading apps and the game. I do not want to delete the instance as I feel that is an absolute last resort option. I wish to save or recover the last most important advancement I made in the game which I was attempting to do when computer froze up. What's the point if the action you are recommended to take to save data, progress, etc. is the same action that causes loss of said data, progress, etc. There is a log on the first instance with the original error but not on the back-up that became Noxplayer(1). I have drawn a conclusion that there should be a solution that fixes the Android function and returns the instance back to usable instead of delete and start new. If the data and info were not affected by this action of delete and renew then there wouldn't really be a problem. I think a work around should be possible but I don't have enough knowledge or expertise to do this without some help. Any information or help would be greatly appreciated and would more than myself. If I should seek this assistance elsewhere a kind redirection would be appreciated. Many thanks for any help. Tim

Debugging broken on breakpoints set within custom views, hit from xml inflatation

I have incredibly hard problem to pinpoint.
I have a project which is not really important here (actually tested it on other project, same thing, and also on another computer, same thing) with typical hierarchy. Within it I use custom views, and also use custom views from my external library (which initially thought is the cause, but it isn't as the same thing happens with custom views within src of the same project). I use some of those custom views inside my xml's defining views. I had a need to debug some operations going on within one of those custom view classes. So I set couple breakpoints, ran the project, and when the runtime hit them I saw this screen:
As you see the debugging is broken although the breakpoint is hit on exact line I put it. I cannot do anything here though, except resuming it or terminating it. All the "step in/out" options are greyed out, and the stack trace for the main thread is literaly gone.
This happens on the Galaxy S4 (i9500) that I aquired lately. I cannot say for certain, but I'm pretty sure on my previous Galaxy S+ (i9001) it did not happen.
More information for you:
My i9500 is rooted with custom kernel flashed. The DDMS screen also does not show any processes that are going on on my device (was deffinetly showing on galaxy s+ I had before):
As you see, the processes are being shown just fine inside an emulator, but there are no processes (the application process for the project, after I run it is being shown there, but nothing else).
As for emulator, same machine (tested on both), same environment, same projects, and no problems with debugging it whatsoever:
As you see, everything is perfect over here.
Another important information is that it only happens (from what I see) when xml views are being processed. When I create a reference to one of my custom views manually, debugging works as expected on both the emulator, and the device. So far, it only happens when the breakpoint is being hit when the xml view is being processed.
The last piece of information is that my Device Chooser when I deploy application, shows empty space inside the Debug column. I don't know if it's relevant or not.
I've lost almost 5 hours now looking for solution of this problem (and the cause) on the web, without any luck.
From all the circumstances, it seems the problem is with galaxy s4 I have, not with the computer, or the IDE, or the project itself, but the question is, what is the problem. Tried reinstalling samsung drivers, tried uninstalling those and installing PDA.net drivers alone. No help.
If anybody of you will be able to figure out this puzzle, you are God. Besides that, you will have my deepest gratitude, as this issue is driving me nuts.
ps. I have all the android SDK's up to date, and eclipse plugin as well.
Half the answer (so far).
Upon updating to new 4.3 update, and new custom kernel (Perseus Kernel alfa 14), the DEBUG flag is shown in the Device Chooser dialog screen, and is set to YES. Also, the processes are now visible in DDMS.
Unfortunetly, still the stack is empty once the breakpoints are hit in the custom views.

Preview Issue Android Studio

as already told in the title, I have an issue regarding the preview tool of Android Studio.
As I install the program, all works fine. I can create layouts and previewing them without any trouble. The problem comes when I restart my computer. Every time, the preview tool disappears (grey unselectable menu option and no other buttons to activate it around) and I can't manage to make it work again, unless I re-download Android Studio and I re-update the SDK. It's really annoying, because it's difficult to project a layout without restarting the computer, looking at what you are doing or loading it every time on the phone.
I've attached a screenshot, can anyone help me? Does anyone know a solution?
as you can see, there is no preview and no button to activate it
What about clicking on the design tab at the bottom of the editor ?

Eclipse won't run Android app until I click Run a few times, no feedback or status information

I've started Android Development and I'm using Eclipse for the first time in years, coming from a Visual Studio background. When I click Run in Visual Studio I begin to get feedback immediately. Using Eclipse however, I get very little feedback and it's only after a few clicks of the run button.
It normally takes a few minutes for the app to run after making even only the littlest changes to the UI XML, and I will see nothing in the LogCat or Console tabs. I'll click run.... nothing, click run again after a few minutes.... nothing, click it again after a few minutes.... and finally it'll give me some feedback that it's launching the app.
Is there any way to improve the responsiveness / feedback I'm getting?
Yeah....just waiting. You don´t have to push the run button many times. I would be happy if there where another solution, but fact is, that the emulator is terrifying slow. Even this depends on the properties from which You created your AVD. There are some setting when creating a new one, internal storage and ram size. The lower these values are the faster it creates an emulator. This depends on what You need, if You don´t need sd card storage, disable it. If you don´t need much ram size, set the minimum. Even there are some tricks to speed up a little bit:
http://developer.android.com/tools/devices/emulator.html#acceleration
It seems that there is a faster alternative emulator, but I hadn´t tried it:
http://enisgeeks.wordpress.com/2013/03/21/an-amazing-alternative-to-android-emulator/

Application restarting after installing from SDCard and putting it on Background

I've created a sample application (just a textview, nothing else), and I noticed a bug.
After installing it from the SDCard, it displays the "Application installed" screen, with the done and open buttons.
If I click the open button, a strange thing occurs:
Whenever I put the application in background and reopen it from the application icon, it doesn't reopen it, it creates a new instance.
I can confirm that it is creating a new instance, because after putting it on background and reopening a few times, when I click the back button, it opens the previous instance, instead of returning to the home screen.
Now the strange thing is that it only happens after installing from the SDCard and clicking on the open button.
If I click the done button (or installing via ADB) and open the application via icon, it doesn't happen.
Also, if I click the open button (and the bug occurs), after the application is ended for the first time, the bug doesn't occurs anymore.
I've tested it in different devices and in different Android versions (GB, HC and ICS), and the bug is reproducing in them all.
Does someone know if this is an known issue from Android and if so, does someone have an official reference that I can refer?
Thanks in advance
Yep, it is a nasty, well-known Android bug that has been around since the very beginning. See the following:
Android issue 26658
Android issue 2373
Android app acts differently installed from adb vs sdcard

Categories

Resources