Android studio random freezes after fresh install - java

I'm quite new to the Android Studio IDE however I simply cannot get it to work. After launching studio, it'll only take me interacting with the GUI to freeze the entire program, with the only way to close it being to end the process via task manager. I have no idea what the problem is, I have jdk 8 installed with the correct path and its a brand new installation (yes I've tried reinstalling). I've included my thread dumps if that helps:
https://drive.google.com/file/d/0B1Fi84lOZ2nIYk13dDBtMXB1akk/view?usp=sharing

Related

Java Swing applications not opening in NetBeans

I have been having some major issues when I try to run a new Swing application. I am using NetBeans 8.1, JDK version 1.8 and OS Windows 10.
So every time I try to open a new Swing project (doesn't matter if it's just the app project or an EA) and I run it, NetBeans deploys it correctly but the Swing window doesn't open and in the status bar of NetBeans it just shows running. I wait for several minutes and then I have to stop the build because nothing happens. When I faced this situation before I uninstalled NetBeans and Java and reinstall them, and it's fixed. But I don't want to uninstall and install everything again when I want to open a new project. I am right now learning about Swing. If that project has a Web version, it works fine. I've put my laptop on Airplane mode so WiFi is disabled (a friend told me to do this) but with no luck.
So this is my IDE and it says "Running" in the status bar when I run the project using the Swing project, but the application window is not opened
enter image description here
You should debug this application, maybe one line code is error or not complete, ... can stop your application. This status bar show is running maybe your application not dispose then it still running

Eclipse freezes on android project build

I've tried to create a new project on android and ran it without any problem in my emulator.
I added the google-play-service library in my eclipse workbench and linked it to my project. Then I tried to run it again and my eclipse started loading... Then the progress bar stopped to move, then I saw eclipse took 80% of my CPU capacity! So I shut it down and tried again, same thing happened.
For your info I imported the google-play-service library from
sdk\extras\google\google_play_services\libproject\google-play-services_lib
and I still have not touched the example code in the MainActivity.java
I solved this issue on my own PC (Windows) by allocating more memory for Eclipse. Add this to your properties if you're on Windows (you can give the same command line arguments in linux).
Taken from this SO Post

Restart Gradle without restarting Android Studio

Restarting Gradle when android studio shows that I have errors fixes them sometimes. Is it possible to restart Gradle without restarting android studio as it takes a while for it to load on my machine.
You can write the following onto the terminal tab in android studio:
gradlew --stop
After it executes successfuly it can take some few seconds to take effect (not more than a minute). The point is that it'll have to end the current task it'll be processing at that moment. If the task is frozen this command won't work.
As you already might know you can find all the tasks being processing at gradle console tab in android studio.

my eclipse install another app instead of mine in emulator

I'm having a problem with my eclipse i have edited my app and it's ready with no error shows but now when i run it into my emulator it runs another app i have in my eclipse so i deleted the app and still i run the application i want in the eclipse and still it shows the old app that i didn't even ask to install it in my emulator so it's installing an app that i don't have at first place in my eclipse i don't know how it is possible i cleaned my project and still the problem is there and changed my emulator still its install the old app for me
uninstall the app from the emulator and check in your run configuration about the running app and try with new emulator
Be sure you have selected in package explorer the app you want to run. Try to unistall the app from the emulator or create a new device on emulator. Hope this help.
Check the Run configuration: Run->Run configuration. Under the Android tab, choose your project. If you run in Debug, you have similar option too.
Another similar case I saw, is that some application was installed, but the name was not updated. Verify the names of your application in both the strings.xml and the Manifest. (If you create a project by duplicating another one, it might be the problem).

Android Emulator not loading on netbeans

I just downloaded the android sdk from the adnroid site and followed this tutorial to set it up on netbeans. Everything to seem to have installed fine but whenever i try to run the application this window pops up:
alt text http://img80.imageshack.us/img80/4327/androidemulator.png
What I am assuming it asking me to choose the emulator, but it is not showing up on the list. Is there a reason why?
I don't use netbeans, but it looks like you don't have any AVD's created, and if you do, then there is probably a way to associate them that you are missing in netbeans. You can check here to create an AVD http://developer.android.com/guide/developing/tools/avd.html
But I would just use eclipse if possible, the integration works really well, and it was written to run in eclipse, so there are less issues and hurdles.
Also see Running Your Application section of http://developer.android.com/guide/developing/other-ide.html that will describe how to launch the app from the tools outside of the IDE.
I have the same problem with you. But i have my emulator works now.
Are you have to do is running your Android SDK Manager, then click Virtual devices, and Make new AVD device.
Click New. Then fill name, and select Target (Platform of your Android), Skin, and hardware.
Then click Create AVD to finish.
Now you have device to choose. :)
go in C:\Program Files\Android\android-sdk\SDK Manager.exe and create the virtual device. After it appear in device list.
Thats it.
Open Sdk manager
Tool Manage AVD
Select and start AVD. wait open.
Goto netbean Run project.
U must see project run in AVD.
Success..
The article at the link #broschb had posted is explaining how to create an AVD using command line. Do exactly what is says there (it's very easy). Once you have created the AVD it will appear in the AVD list in Netbeans. Actually, if you have only one AVD it will start by default when you run your app.
run the avd manager which is location in the android-sdk folder and then create a new avd,but be sure you have already downloaded ARM EABI system image tool set.
Just create avd (android virtual device) and run it..
like android -avd "name of your avd"
Then try to run your application.
It will ask you to select the virtual device that you have started above.
Thats it.

Categories

Resources