Android AVD / Eclipse - android

I have a problem with AVD. If I launch it from eclipse, load well but doesn't appear in screen. After that, I try it from terminal but I got the "Segmentation fault" message. Reading another topic I read that it is problem with 20 version of android SDK and to fix it, I should try: .../tools/emulator-arm #nameAVD. It works.
But I still have a problem, I need launch AVD from eclipse to debug applications! Can somebody help me?
Thak you a lot.

Can you tell us a bit more about your system, build, and what version of Android/Eclipse you are using?
if not, try uninstalling and re-installing eclipse, but use the Eclipse Classic version from http://www.eclipse.org/downloads/
then if it doesn't work still, try to delete and redownload the android SDK.
if that still doesn't work then chances are you have something wrong with your system settings
======================
EDIT*** here is a possible TEMPORARY solution..
only use Eclipse to clean/Build your projects, and use your terminal to install your app onto your emulator.
to build an APK without running, right click on your project, go to "Android Tools" and hit "Export Unsigned Package", which will prompt you to store the APK on to some place. Then, open up your AVD emulator and terminal. on your terminal, "cd" into the directory that you saved your APK file (like inside /...../Your Project/bin/) and then run the terminal command "adb install yourAPKfileName.apk"
this will automatically install the newest APK to your emulator and run it. since this process for building is a little slower than usual, i would recommend only building/running when you need to, and always export the APK to the same place, and have your terminal open to the same place, so that when you press "up" on the terminal, it repeats the last command you used :)

Related

Android Studio 4.0 installer does not install SDK

I hope that someone can help me with this. I'm working with UE4 and in order to compile for Android I need to install Android Studio v4.0
When I install it, it says that I don't have the SDK (it should be downloaded by the same installer as I read)
Step 1
Then when I click on Next, it says that I do have the SDK (which is wrong, the folder doesn't even exists as you can see here)
Step 2
Finally it throws an error and the Studio keeps installed but not the SDK.
Step 3
When I run Studio SDK Manager option in the lower right menu does nothing when I click on it.
So I tried everything. Installing an SDK manually. Creating the folder. Doing a full uninstall, a deep clean of all "Android" related entries in the registry. Deleting manually all the folders that Android Studio Uninstaller left in app data, local, roaming, and nothing.
I don't want to reinstall widows just to try if that mess of installer decides to do a proper clean installation without errors. Any suggestion? I would appreciate it so much!
Regards,
Roman
What do I expect? Just to install it with the SDK and have it working. Just that.

Cannot launch AVD in android studio

I know this question have been asked so many times but I have exhausted all the options on SO and other platforms as well and idk what to do anymore. I have installed HAXM, I have tried to set the path to the right folder, installed/uninstalled the thing, and what's worse I tried to uninstall again today and there is an error saying it cant find uninstall.exe I have an important project in another 2 months and my phone's USB port is faulty so I cant run my apps in it. please help
First of all go to the folder where you have installed your Android Sdk and if you don't know then go to File in Android Studio and select Project Structure like this
Then Select Sdk Location where you will get the path of your Android Sdk.
Then go to AndroidSdk/emulator folder and open cmd,
Then type this command ---- emulator -list-avds ----
After that you will get list of the emulators installed and then run another command ---- emulator -avd "The exact name of device you want to run" and press enter.
The emulator will start if it doesn't it means you have some errors in system - image. You can solve it by deleting the previous system image then download new one.
The slashes are just to differentiate the command, nothing else.

How to install an apk on the emulator in Android Studio?

How do you install an apk on the emulator in Android Studio from the terminal?
In Eclipse we did
/home/pcname/android-sdks/platform-tools/adb -s emulator-5554 install /home/pcname/Downloads/apkname.apk
Now how about in Android Studio?
Run simulator -> drag and drop yourApp.apk into simulator screen.
Thats all.
No commands.
EDIT: Even though this answer is marked as the correct answer (in 2013), currently, as answered by #user2511630 below, you can drag-n-drop apk files directly into the emulator to install them.
Original Answer:
You can install .apk files to emulator regardless of what you are using (Eclipse or Android Studio)
here's what I always do: (For full beginners)
1- Run the emulator, and wait until it's completely started.
2- Go to your sdk installation folder then go to platform-tools (you should see an executable called adb.exe)
3- create a new file and call it run.bat, edit the file with notepad and write CMD in it and save it.
4- copy your desired apk to the same folder
5- now open run.bat and write adb install "your_apk_file.apk"
6- wait until the installation is complete
7- voila your apk is installed to your emulator.
Note: to re-install the application if it already existe use adb install -r "your_apk_file.apk"
sorry for the detailed instruction as I said for full beginners
Hope this help.
Regards,
Tarek
For those using Mac and you get a command not found error, what you need to do is
type
./adb install "yourapk.apk"
Start your Emulator from Android Studio Tools->Android-> AVD Manager then select an emulator image and start it.
After emulator is started just drag and drop the APK Very simple.
Just drag APK file to android emulator it will install automatically.
In android studio emulator to run an apk file just drag the apk into the emulator.The emulator will install the apk
Much easier is just to start your emulator, then go to sdk/platform-tools and use adb from there to install apk. Like:
adb install xxx.apk
It will install it on running emulator.
Drag and drop apk if the emulator is launched from Android Studio. If the emulator is started from command line, drag and drop doesn't work, but #Tarek K. Ajaj instructions (above) work.
Note: Installed app won't automatically appear on the home screen, it is in the apps container - the dotted grid icon. It can be dragged from there to the home screen.
For Linux: once emulator is running, the following worked for me.
Because I installed the Android SDK on my home directory, I have the following file structure:
home/Android/Sdk/platform-tools/adb
home/AndroidStudioProjects/Metronome.adk
AndroidStudioProjects is a file folder I made for my Android projects. "Metronome.adk" is the file I want to run.
So, using Terminal from the home directory...
./Android/Sdk/platform-tools/adb install ./AndroidStudioProjects/Metronome.adk
Being a Linux novice, I often forget the need to put the "./" in when trying to locate a file or run a command.
After the command achieves "Success", the app is in the Apps area of the emulator and can be run.
When you start Android studio Look for Profile or Debug apk.
After clicking you get the option to browse for the saved apk and you will be able to later run it using emulator
If Android Studio is already open:
Click on File you can find Profile or Debug apk in this menu too
Just download the apk from talkback website
Drag the downloaded apk to the started emulator, Go to settings on emulator > Search for talkback, you will now find it there
1.Install Android studio.
2.Launch AVD Manager
3.Verify environment variable in set properly based on OS(.bash_profile in mac and environment Variable in windows)
4. launch emulator
5. verify via adb devices command.
6.use adb install apkFileName.apk
Upload your apk file on the cloud , then make a direct download link for downloading and then copy that link and paste it on the emulator browser for download it :) ;
In Android Studio: View - Tool Windows - Gradle
In the Gradle tool window navigate to your :app - Tasks - install
and then execute (by double-clicking): any of your install*tasks: e.g. installDebug, installRelease
Note: the apk will also automatically installed when you Run your application

android app not installing, eclipse juno

I'm using Eclipse IDE for Java EE Developers.
I created my first android application project, and it's supposed to display the Hello World message, but I run it and get nothing(well, the emulator starts but then nothing), no console output view, no error.If I run it again the console appears(...WARNING: Data partition already in use. Changes will not persist!) and the emulator opens in new window but again nothing
Please tell me what's wrong and how to install and run the app?
after first run(pic1&2), after second run (pic3)
It sounds like the emulator is already running and you are launching a new instance of it... based on the log it has been launched earlier and perhaps it hasn't shut down properly.
-Restart adb as poitroae suggested in an earlier answer.
-If that doesn't help, restart Eclipse.
-If that doesn't help, restart your computer.
If you're still having issues after that, post back.
When you run the app, you will see the .apk file under the "bin" folder.
Reset/Restart the adb server. You should do that over the command line. Make sure that you are in your /android-sdk-root/platform-tools directory.
adb kill-server
adb start-server
wait! As far as i can make out, you're just launching the emulator. Isn't it? there's a green button at the top. (like a "play" button) just press it.
Or right click on the project you want to run, and click on "run as > android application" and watch the emulator play your app.
try to clean your project from project-> clean and also donot forget to wipe user data on android emulator...
here is some good discussion about your problem...
Using Eclipse for androidSDK, when I go to run, I get WARNING: Data partition already in use. Changes will not persist!

Android SDK and AVD Manager hangs trying to rename temporary folders

I run Android SDK and AVD Manager in Vista and have problems installing components. The installer downloads components successfully, but at the end of the installation it hangs for about minute and then asks to disable AV software. If I choose 'No', the installer stops with error message like: "Filed to rename directory '...' to '...' ". Thus, I have to unpack downloaded components and place them to proper folders manually.
I have no AV software. I assumed that the installer requires Administrator rights, but runing it as Administrator didn't help.
If anybody fixed the issue, please advice something.
Thanks.
Had same issue on Windows 7 32-bit. It worked eventually for me. Disabling your AV has no effect. It's probably a zombie copy of the manager.
Exit Eclipse etc...
Close most other apps, Run eclipse, run the manager (you have to click on the menu twice for some reason), I eventually got it installed OK on my 3rd attempt - just try again.

Categories

Resources