VDM in Eclipse will not load? - android

I have no experience with app development but I was interested in playing around with androids SDK, I downloaded the .zip file and extracted everything onto my desktop. I was attempting to follow the introductory tutorial on androids website, however when it comes time to launch the Virtual Device Manager clicking the button in the toolbar does nothing. Trying to run the app and selecting to add a VDM does not work either.
Navigating directly to the VDM application and attempting to launch it leads to a cmd window opening for a split second. I was able to take a screenshot of the message though which reads:
"Emulator error: you did not specify a virtual device name, and the system directory could not be found."
Prior to attempting the starting tutorial I successfully launched the VDM.
The path to the SDK is set correctly in Eclipse.
I tried re-downloading the SDK to no avail
I am running windows 7, and the latest version of the Android SDK.

Related

Building my first mobile application

I`m thinking of making my first mobile application and I dont know where to start. so how do I starting building my mobile application?
Good places to start is Getting Started and Introduction to Corona.
First download android studio from this link
https://developer.android.com/studio/index.html
also download jdk from this link according to your machine specification and - operating system
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
install android studio according to instructions (it may take time as you need to download sdk etc)
make sure jdk path has been set correctly in environment variables
launch android studio and make new project (file>new>New Project now when gradle built is finished and no process is running)
go to tools>android>avd manager
create virtual device (choose one with low resolution)
now download the latest android version (click next) select portrait click - - finish and close the window
now click on run>run app (enable VTx in system bios if not enable)
your hello world app will be launched emulator
now come back to stack overflow mark this answer as correct
Important- now do as #Dwhitz told you and google such things before asking on stackoverflow

AVD Manager on Android Studio 1.5.1 and install to a custom location emulator won't run

I installed Android Studio (1.5.1 -- see image for build details).
While installing I chose the custom option so I could install a specific path.
I knew that my %SystemDrive% was pointed at a network location and I wanted to install to my local disk.
So, this means that by default, the application would've installed to :
\networkpath\users\myUserName\Android\SDK
However, since I chose the custom installation I chose a local path:
c:\users\myUsername\Android\SDK
Project Creation and Build Work Fine
Everything seemed to install fine and I was able to create a new project and build it with no problems.
However, when I attempted to run the built and then basically failed silently.
The emulator never appeared and no error occurred.
Android Monitor just shows a message stating that No Connected Device detected.
AVD Manager
Luckily I knew a bit about checking to see what happened with the emulator and I opened up AVD Manager.
The listed device displayed an error.
I right-clicked the device and chose "View Details".
That's when the AVD manager showed that it is attempting to read from the network path, even though I changed this in the custom installation.
\networkPath\Users\myUserName\Windows.android\avd\Nexus4.avd
and
\networkPath\Users\myUserName\Windows.android\avd\Nexus4.ini
Registry Edit
I closed Android Studio. Then I opened regedit and edited the values at:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
which originally looked like the following:
And changed them so they all point directly to the c:\ drive (instead of %systemdrive%)
Environment Variable : ANDROID_SDK_HOME
I found that others have mentioned the ANDROID_SDK_HOME environment variable and I noticed that my machine doesn't have that value defined at all so I added it and set it up like the following:
c:\users\myUsername\Android\SDK
I then started Android Studio again and started the AVD Manager.
This time there were no devices show, but instead AVD Manager prompted me to create one with the following window:
Now, I'm attempting to download one of the devices with Google APIs, but each time I do, they download and install successfully, but then disappear from the list. Notice, in the next image there are not API Level 15 or 16 with Google APIs for arm architecture.
Notice additionally that there is one listed for API Level 17 with arm.
I will now attempt to install that one.
You can see that it downloaded successfully and installed fine.
Now, I click the [Finish] button.
The item no longer appears in my list.
The API Level 15 item is chosen automatically. I'm assuming because that one was downloaded originally when I installed Android Studio.
Finally, if you uncheck the [ ] show downloadable system images checkbox -- which is terribly confusing -- and I'm assuming shows you the ones you've already downloaded, then you'll see that it only shows the one API Level 15 virtual device.
This is all quite terrible. Has anyone seen this problem?
Has anyone else been able to fix it?
I'm assuming that I'll just have to go and do a complete re-install of Android Studio.
You should look in the idea.properties file in your project (Android Studio path to different directories). It sounds like this is set to override the system's settings.
EDIT 2 With Final Solution
Thanks to an alert and astute SO post-er (code-apprentice) I was able to get to a solution.
Here's what I had to do.
create idea.properties file and place it at the \networkLocation\myUserName\.Android 1.5\
place the two lines in it which point to my local disk
idea.config.path=C:/Users/myUserName/.AndroidStudio1.5/config/
idea.system.path=C:/Users/myUserName/.AndroidStudio1.5/system/
Then I started Android Studio again and I attempt to install a system image which included the Google APIs.
It worked and it was added to the list:
However, it still did not show the other API LEVELS which I had installed before (15, 16, etc).
Deleted Them From Disk
I noticed that they had been located in a local folder at :
%userprofile%\Android\SDK\add-ons
for whatever reason.
I deleted all of the folders under that path and the original APIs with Google choices appeared in my list again. See highlighted item in image.
SOLUTION
Now when I install them they show up in the list and I can create new AVDs based upon them. Everything works.
EDIT
I used a tool I wrote to watch where Android Studio wrote to disk and I found a path that reveals the problem:
Even though I've made extensive changes to insure the installation would install completely on my local disk, Android Studio saves some (a lot) of data out to this path.
I did a Google on : .AndroidStudio 1.5\config\
That led me to the following documentation:
http://tools.android.com/tech-docs/configuration
There, you will see that the installation should be using %userprofile% to determine where it writes this data. My %userprofile% points to my local disk (c:\users\myUserName) but Android Studio still insists on writing data out to the network.
Here's the important information:
Windows:
%USERPROFILE%\.{FOLDER_NAME}\studio.exe.vmoptions
and/or
%USERPROFILE%\.{FOLDER_NAME}\studio64.exe.vmoptions
%USERPROFILE%\.{FOLDER_NAME}\idea.properties
I deleted the remote .Android Studio 1.5 directory and copied it to my %userprofile% (local) directory. Then I restarted Android Studio and it thinks that it needs to generate all that again because it wants to place it at the remote directory again.
Core issue:
Obviously, it is not using %userprofile%
It gets worse.
I uninstalled the application and all of the settings (supposedly).
Then I installed the entire thing again and it looked as if it were choosing the correct installation path by default:
But, when I started Studio back up then it opened up the project I had created with the first install.
Plus, I still cannot see the API image that I supposedly installed before. Only that one image. Nothing else.
This is really not a great installation system. I'm working on a book which helps beginning Android Devs but if they fall into this problem loop there is no way to get them out of it with a good running emulator.
Very unfortunate.
Download the respective SDK and API levels and Image Systems on Android SDK Manager.
And then they'll show up normally on AVD.

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 is not working on Windows 7

I am novice in android development and facing some problems. I have installed Eclipse helios along with ADT 0.9.9 and Android Windows SDK and android 2.2 package. I have developed a small app for testing (one button and EditText control which displays message when user clicks button), it complied successfully. But when I want to run this on emulator its not showing there. It once installed and worked but after I updated my code (Updated only message which will be displayed when user clicks button) its not showing the updated output so I uninstalled app from emulator using app manager. I tried every thing (used Run As and creating Android config even freshly installed SDK) to solve the problem but couldn't. Even DDMS not listing any process or any sign of running emulator. Not in even Log Cat
In bin folder of application project you will find the .apk file. Manually install it on emulator or device
Check manifest file to see which activity is first loaded?
I prefer 2.

Categories

Resources