Android app layout not updated unless I restart eclipse - android

Im Very new to android development.
Im following this guide: http://www.vogella.de/articles/Android/article.html#overview
for some reason, any change in my application is not reflected unless i restart eclipse.
It doesnt matter if i uninstall the app using ADB, the emulator itselt.
I clicked "refresh" and run numerous times but not avail.
I completely changed the layout everytime but I had to restart eclipse itself (not the adt) in order for it to reflect changes.
Am I missing something here? thanks.
Eclipse 3.6.2 on Windows7 64bit

Right click on the project name in Eclipse, select Run As.., Android Application. Then you should see a pop up window showing the running Emulators. Select one from the list, and click Ok.
Also make sure your app doesn't have any compile errors, as that could definitley screw things up.
After trying to run, check the Eclipse console and it should say "Uploading yourapp.apk to Device..." or something. And it should launch the app on the Emulator. Look for any errors in the Console as well.

I had the same problem and worked around by changing or removing android:id attribute of a root element (typically viewgroup). I have Eclipse SDK 3.7.0 running Win7 64bit
Hope this helps

Related

Android Device monitor disabled

I'm just getting started with Android development and was setting up Android Studio on my mac. (Following the instructions here)
When trying to run a simple hello world application and trying to learn my way around the IDE, I noticed the "Android Device monitor" disabled. Any ideas how I can fix this? This should be important when debugging apps hence the question.
I'm not sure what other info might be important for this question. I did make a few changes in the SDK manager, but they were just installing more components on top of what was already installed.
Once you open a valid project, the buttons become enabled.
Note that, even if the option is disabled, you can still bring up the Device Monitor by running the monitor.bat file in the tools directory of the Android SDK. (On Windows you can just double click the file or run it from a cmd shell.)
This problem occurs to me today. And I just click the button on the pic.
Problem solved.
and If this didn't work ,you can check this list in your Android Studio
1.Tools->Android->Enable ADB Integration
2.If you open DDMS, CLOSE it .
If these didn't work too, check the official file.
https://developer.android.com/studio/profile/am-basics.html

android studio - emulator doesn't work and genymotion doesn't get recognized

I'm building an app in Android Studio (beta) 0.8.9, though I can't seem to get emulators running. I've made a Nexus 4 and 5 emulator through the options, but I can't seem to get them started. It shows this in the Run App tab.
Waiting for device.
"C:\Program Files (x86)\Android\android-studio\sdk\tools\emulator.exe" -avd smallEmulator -netspeed full -netdelay none
So either it's not starting up, or I'm just an impatient SOB.
I've also downloaded Genymotion and started up an emulator through that, but now Android Studio doesn't recognize the emulator anymore. I try to run my app and check for any running devices, but it doesn't show up, despite the fact that it actually is running.
I've added the Genymotion plug-in, to no avail. No idea what went wrong.
I also have a One Plus One, which I'm not sure how I can debug on that. They don't seem to have drivers for that and haven't immediatly found anything on Google so far.
Any help would be much appreciated.
EDIT: I fixed my problem. I used Genymotion to fix the problem. The running emulator wasn't turning up, because the android SDK's weren't linked to one another. Genymotion and Android Studio used different ones. So I edited Genymotion's settings to use the same one of AS and now it works!
First of all, update android studio. Check if the emulators run from the AVD manager outside Android Studio, I mean by starting it up manually from ur SDK installation folder (AVD Manager.exe) . Check the path of ur emulator in .ini file in C:>Users>user-name >.android>avd. U can make a system variable for ur SDK folder "ANDROID_SDK_HOME" and place the .android folder's content there (the whole .android folder). Sometimes "resetting the adb" after u run emulator may work.
There may be an easier fix than what was previously mentioned. Try opening Android Studio, go to File, Settings, plugins. Select the “Browse Repositories” button at the bottom of the page. Scroll down the displayed page to find “Genymotion”; select it and install it.
When it has installed, restart Android Studio. Again, go to File, Settings, then go to Other Settings. Genymotion should show up as an option. There will be a field that asks for the path to the Genymotion folder.
Mine was: C:\Program Files\Genymobile\Genymotion. At any rate, enter the path, click Apply or OK and Android Studio should recognize Genymotion (You may need to restart AS once again). Now you should have a small red icon on Android Studios tool bar; when you hover over it a pop up that identifies it as “Genymotion Device Manager”. Click on it, select a device to load, click start and allow the virtual device to start completely. Now run your Android Studio project; the Android Studio “Device Chooser” will pop up. You should see the Genymotion device you’d started previously, select it and you’re good.
Hope this helps…

Android Studio freezes on startup

I searched all day but haven't find a solution yet.
Today I installed Android Studio without any problems.
I added the correct path.
JAVA_HOME to C:\Program Files\Java\jdk1.8.0_20
and
JDK_HOME to C:\Program Files\Java\jdk1.8.0_20
But, when I start the program it freezes on the loading screen. (The gray picture with the green android logo and text Android Studio)
It does create a process that I can't close, but after waiting for 20 minutes it's still on that screen.
I tried a clean install, also I tried the 32bit version without any success because it complained about the jvm that I could not fix for some reason.
I also did an update for it, but without success.
I have no idea what else I can try to fix this, but I also don't see myself going back to eclipse.
What worked for me was to disconnect my android phone which was connected to the computer(in the debugging mode).
I went from 1.5 to 2.0 and after updating it wouldn't load (hung at the startup screen). I had to delete the .android folder, the android.15 folder and the .AndroidStudioPreview2.0 folder under user. I also had to rename the SDK folder and after it started up I rename it back to what it was. Which means I had to add the path back to android studio. This was the only way I got it to work.
The same issue. "Run as administrator" helped me.
Another possible solution comes from JLund (from the comments):
I did this from the command line:
adb kill-server
adb start-server
and that unfroze Android Studio at startup for me.
Make sure there is no ANDROID_SDK_HOME, ANDROID_HOME or the like defined as you environment variable. You might need to uninstall any Android SDK previously installed manually after removing those environment variable.
My Android Studio auto loads the last worked-on project.
I cancelled the loading project before the IDE hung.
The Android Studio launcher comes up. Select the "Open an existing..." option.
Windows 10
Java 1.8.0_131
Android Studio 3.2.1
Android Studio kept getting hung up on a white screen before the IDE loaded any buttons. I renamed the project that it was trying to load, restarted Android Studio, and selected another project and it loaded correctly.
I had to revamp all manually installed 'HOME' environments and start it again-

Not able to create new Project with ADT version 20

I have recently updated my ADT and it is now ADT_V20. I have also updated my SDK platform tools as well. But I am not able to create new Project through Project wizard from Eclipse.
I have Eclipse Helios latest version. and It was working well with old ADT versions.
In the project wizard I have reached upto Install Dependencies screen, where "Next" and "Finish" buttons are disabled. I have tried to "Install/Upgrade" new version as shown in the wizard and that process is completed successfully . Still I am not getting "Next" or "Finish" buttons enabled.
This same thing happens on the other PCs as well.
Could anybody please help me ?
Thanks
Looks like you can get around this issue by uninstalling the Support library from the SDK manager, then reinstalling at the prompt in the wizard. I had the same problem you did, and this solution worked for me.
Source: http://code.google.com/p/android/issues/detail?id=33859
In the new Android Project Wizard on the second screen where is says "Select whether to create an activity, and if so, what kind of activity"
Simple un-check the Create Activity, A new Blank Activity will be enabled to be created. -
Click Finish.
They might push a fix for the issue you have highlighted soon.
I have come across some more issues related to Ant build.xml not able to find "com.android.ant.NewSetupTask" due to this upgrade to ADT20
After installing ADT version 20, I have this problem creating a 1.6/API 8 project now that the newer (version 20) SDK is installed.
Would one of the experts try creating this even WITHOUT the 'activity' please?
I cannot complete with the blank activity checked (due to the missing API 8, which tries to install the already installed API 9 when asked to update), NOR can I complete with NO activity selected.
In the latter case, i.e., uncheck the create Activity box, the Finish button appears, creates the project partially, but not one that will build (as the older versions would do even with an old API.
Also, there is no actual indication that the "Finish" has worked -- you must look over in the browse pane to see the new project even though the dialog remains.
If any of the above did n't solved your problem please do one thing, try DELETING org.apache.log4j_1.2.17.jar from eclipse/plugin directory !!!!
In MACOSX, with Eclipse Helios IDE, this solution didn't work for me. I solved the problem uninstalling the components by the SDK tools and installing them again by the same SDK manager. I tried to reinstall the components by the same new project dialog, but didn't work for me, my only solution was that, uninstalling and reinstalling from sdk manager.
I hope this solution works for you :)
My solution is that I found out that Android Support Library was not installed on my computer (I didn't even have an Android folder under extras/. I ran the SDK Manager as Administrator, selected this and installed it. Then I tried creating a new project and I got the same error. I clicked Install/Upgrade and the Finish button became enabled. The next time I created a new project, I didn't get this error.
In my case the app had been created, but I didn't see it as it was completely obsqured by the welcome splash screen. When I didn't see it, I tried to create the app again, and it was failing to finish silently. Only when I ventured to close the splash screen did all become clear.

Unable to work with Android in Eclipse

Initially I was working on Android in Eclipse and everything went fine. But two weeks before i installed Texlipse plugin and was working with it. Now, when i wanted to switch back to Android i'm unable to.
In new project there's no option for creating a new Android project nor even a Java project.
Even i tried to change the Preference window to Java or Java Browsing but anything didn't work. Now i'm unable to run or compile even a single java file even after changing the perspective. I don't know whether this could be due to Texlipse, i tried searching google for ways to uninstall Texlipse but nothing worked.
So, pls anyone help me to sort this out...
Unninstall eclipse and install ADT again
If you want to play something before eclipse uninstall, what you can do is, go to your eclipse--->plugin folder (C:\eclipse\plugins something like this). There you will see all androind plugins which starts with com.android.....You may delete them and repeat the steps defined in this link.Android eclipse setup
This is one try but can't guarantee (Remember this may messup your eclipse if it don't work, so get ready for eclipse unstall if it doesn't work).
You could try launching Eclipse with the -clean parameter. This saved me when Eclipse was hanging on startup. Certainly worth a try before a re-install. More info here:
http://www.eclipsezone.com/eclipse/forums/t61566.html
go to windows/android sdk manager. If it works and androids vesions you've choosed are there, AND you don't see android in eclipse, I am afraid you will need to reinstall everything.
If sdk manager won't work, than install start sdk kit (http://developer.android.com/sdk/index.html). After that run sdk manager and set up the packages you need. If it won't work,
go to help/install new software and uninstall items that were installed in the backward sequence. After every remove check the prev step
I HAVE met the situations where only cleaning off all eclipse info and reinstalling it helped.
So, good luck!

Categories

Resources