I've been working on my application, in android, for quite some time now when suddenly my layout started messing up with me. I"ve a client server based game which was working pretty fine until i dont know what happened that the xml disappears on the emulator and even when testing on the phone. However, it reappears after a number of tries but takes couple of days at times. Also, note that the functionality of the screen with missing buttons still works but that area of the layout remains invisible. The game fetches data from the server which is currently hosted on my PC from where i'm testing it.
Please help to understand what could be the reason. I'm clueless...
This type of behavior can be happened if the application is not properly Build. Try Clean + Build your application every time you want to test it.
Related
I developed a firebase app, where one could post and you could like and react. Then, I stopped working on it. After some time, I started working on it again, when I was working on it, I found that the app now runs very slow, I had 3 layout (fragment used) and view pager added to it via adapter(before). Beforehand it used to work like a charm, but now when I move from one activity to other, the mobile device kind of like hangs. It was not behaving like this previously, why is that? Anyone facing similar problem?
First of all I would propose you allocate a larger memory to your ADB virtual device.
If this doesn't help, use Android Profiler to better understand the cause of this memory loss.
https://developer.android.com/studio/profile/android-profiler.html
Just go to your AVD device settings and disable Device frame, this will improve the speed of your emulator
we're developing an cordova android app with angularJS/Ionic. We installed our app on several devices and everything worked fine for a week or two. But since a few days the app randomly becomes black while in use. You can "resurrect" the app when you click the hardware back-button. It seems like the whole GUI is black but all services are still running.
The next problem is, that we have no access to the devices and our own devices don't show this behaviour.
Maybe anyone here has experienced something similar and can help me work it out or can provide us a few good ideas for logging this kind of errors on android?
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/
I'm building the android application but I'm fed up while I'm designing my app every time I change even font size I will have to wait for re-installation is there any way to speed up this designing way?
and also
if I change the code every time I'll have to debug is there any way to speed up this task too?
My main question is if I navigated to 10 Activity and the changes are in 11
then I'll have to re-navigate every time I would be hectic. I can not move directly to the 11th activity coz I need some values from the previous activity and one more thing
something like on-web page we do just refresh that particular page and see changes
##Note: This question will help you a lot with this problem see here
I have felt that debugging on device directly is faster than using emulators. Also, if you're working in windows, its a little slower than Linux and MacOS. You can try those platforms too
Sometimes, it is inevitable that you have to re-install the apk to test some changes. In order to speed this up, the only way will be to try to fine tune your system, so that it runs faster.
For testing a simple change, like a new font size, you don't have to reinstall the apk however. You can visualize the changes inside Eclipse or use a tool like DroidDraw.
Yes, there is a faster way though, first step run the debugger in Android Studio. The first thing you notice is debugger breakpoints might slow debugging dramatically(something like that). Then click on this ...
Here you can see all the breakpoints you have in your project.
You can remove debug points left in your project in the bottom box.
This boosted my debug process in any device this is the best solution.
kishu27 is correct by saying that debugging on a device is far quicker than using the emulator. If you don't have a device available, you can keep the emulator open between runs, so you don't have to wait for it to initialize each time (which really is painfully slow).
Another tip - if you have a lot of resources in the project that results in a large APK file, you could take out all the unnecessary ones while you're debugging a particular part of the application. This can speed up the installation process if the APK becomes a fair bit smaller. (This comes from experience when I was writing an app that had many sample videos in for testing - cutting out all but one and using that one wherever possible when it didn't matter what video was there meant the APK was far smaller and vastly sped up installation time.)
I have a very simple Android app. It is one Activity with Text and Buttons, and as you click on the buttons (onTouch events), they become invisible and the text changes.
This works fine for Android 3 and Android 2.3.3 simulators, but when I use the BlackBerry nature in Eclipse to send the app to a BlackBerry playbook simulator, funny things happen. As I click on the buttons they go invisible, but other buttons change too.
Buttons that were only ever visible, stay visible. Some Buttons that were invisible, become visible. Some buttons that had become visible earlier, return to being invisible.
It feels like a redraw problem, or some strange caching on the button state.
Anybody got any ideas? Wild guess excepted ...
Get a playbook or wait until RIM updates their broken simulator.
I converted an app for the playbook and the code was running fine on the simulator. It's a very simple app too, like a binary calculator. A couple of toggleButtons, Buttons and a TextView.
The app had visual issues, similar to yours. Buttons disappeared. Buttons were highlighted when I pressed buttons around them. ToggleButtons didn't change state. And much much more.
Since I don't have a playbook I couldn't test it on a real device. I tried layout changes, code changes and tried different settings. But nothing helped, those issues stayed.
After some reading in their forum I came to the conclusion that this might be an issue with the simulator.
So I submitted the app to the AppWorld 5 days ago. It got approved today.
So there is a chance that your app is alright, and the problem is the simulator.