How to use selfbuilt android in eclipse? - android

I have built android from source with this instructions and soon I got a generic full-eng build. It also launching in emulator. Now I need to use this android distributive for testing any specific software.
I also have customized eclipse for working with android SDK and AVD; and those are working well too. But I need to change usable android virtual device to self-built android. I didn't find the necessary settings in AVD manager.
How to do I do this?

I found solution!
1) Create in AVD manager new device with same API with as your self-built project is.
2) Go to ./out/target/product/$device/
3) Copy next files: hardware-qemu,ramdisk.img, system.img, userdata.img, userdata-qemu.img
4) Go to ~/.android/($device that we have created in step 1) and paste just copied files.
5) Now you can test your eclipse projects on self-built android.

Related

Running android project

I made an app and after many days I want to run it again . Because of my project was on SVN for using the app I follow this steps :
1.File--> New--> Other--> SVN--> Project From SVN ... and so no
But when I right click on the project name to run it there isn't item call "1 android application"
when I want to config it for running ,in Android tab --> Project--> Browser I can't see my project and it's list is empty .
Also I can't find AVD for running on it (I made three AVD already...)
How can I fix it... :(
please guide me.
Thanks ;)
Ensure that your AVDs are running Android version with target API. For example if your project is for API 14+, no AVD with API < 14 will be listen on Target AVD list.
In the comments you told you are not seeing any Android tab in the project properties, you should be seeing something like this:
I would think then, that you do not have the Android SDK well configured, or your project is not set to be an Android Project.
Try re installing the Android SDK. Or creating a new Android project and copy all the files in that new project.

Phonegap How to make android build

I have created a build in ios successfully. Now i am trying to make build in android.
I have added android platform and imported this in eclise(ADT). I want to make configuration for android, as i am new to mobile application. I am unable to find any good reference for building android tutorial. I looked into getting started tutorial of phonegap but it was not much helpful
I assume you're using Cordova 3.0 and CLI
Proceed as following (some steps you might have already done, for completeness, I list them here anyway)
Open Eclipse ADT -> Window -> Android SDK Manager and make sure you have at least the 'Android SDK Tools', 'Android SDK Platform-tools' and at least on API installed.
Add the 'android sdk tools' and 'android sdk platform-tools' to your path.
In your cordova app (e.g. /myApp) folder, execute $cordova platform add android
Im assuming you have all your jscode correctly bundled in the /myApp/www folder, as you already have a working ios build. Otherwise, do so.
Plug in your Android Device or create and start a new AVD (In Eclipse: Window -> 'Android Virtual device manager').
execute $cordova prepare android
Open Eclipse and then File -> Import -> Android/Existing Code Into Workspace. In the opening 'Import Projects'-Window, select your /myApp/platforms/android as root directory. Depending on your workspace, you must select 'Copy projects into workspace', however your workspace would better already include the project, as this saves you from importing a new project after every $cordova prepare statement
In Eclipse: Run -> Run Configurations -> Target:: Enter Your settings depending on wether you use AVD or not.
On the bottom right: Run. Your app will be built and run.
Notes:
If you use mulitple platforms (e.g. android and ios), this way is more preferable than the way of user1306579, where you copy/hardlink your code directly in the /myApp/platforms/android/ folder, as you would have to do this for every platfrom equally and even worse: If you run $cordova prepare (or any command containg this, as $cordova run, $cordova build, ...) you would loose your changes.
Never edit JavaScript-Code directly in your /myApp/platforms/(anyplatform)/www/ folder. Always use /myApp/www/ and run $cordova prepare afterwards...
After step 5 you could use $cordova emulate android (for your avd) or cordova run android (real device), which would replace all other steps. However, if there are errors coming up, finding the reasons might be more difficult.
If your questions was over how to configurate the android app (platform merges, manifest configurations, ...) feel free to ask again :)
Regards, miweiss
I builded phonegap application with ant.
I think that this is not a big deal to build it with eclipse. You should copy web resources to the platforms/android/assets/www folder. Then you should use platforms/android as your project folder. I think you can use symbolic or hard links instead of copying to always refer to actual data.

INSTALL_FAILED_CPU_ABI_INCOMPATIBLE on device using intellij

I've seen some questions about this, but none with real answers nor details. Here is my case:
I have an application that uses Google Maps API v2 which works just fine. Recently I found out that I cannot get it installed on this not ARM-based device.
In order to nail down the problem I'm working with Google Maps samples provided with the SDK (\sdk\extras\google\google_play_services\samples)
which gives me the same error message at install time:
Failure [INSTALL_FAILED_CPU_ABI_INCOMPATIBLE]
I get this message only on a real device using Intellij (12.1.1)
It works fine using both Eclipse on real device and using Intellij on the Emulator configured with CPU: Intel Atom (x86)
Any help would be highly appreciated!
UPDATE
As expected, same thing happens with Android Studio
By default, IntelliJ assumes that the libs folder in the root of an Android module contains native libraries, even if it just holds jars. Thus, it packages the APK making it look like these are native libraries. I just had a similar issue where my application had no native code and would work on the default emulator, but got the ABI warning when installing on the Genymotion emulator. To fix this, tell IntelliJ (or Android Studio) that your libraries are not native code:
Open File -> Project Structure.
Click Modules on the left side of the window.
For each Android module, expand the dropdown and select the Android subitem.
In the Structure tab on the right, delete contents of the Native libs directory field (you can leave it blank).
Once you've done this for each Android module in the project and applied the changes, you may need to rebuild your project for the changes to take place by choosing Build -> Rebuild Project from IntelliJ's global menu.
Latest Genymotion wont support ARM binary. If you have native code compiled for ARM, you can use the Genymotion-ARM-Translation. Just drag and drop this file to Genymotion home folder and reboot .
Reference.
http://forum.xda-developers.com/showthread.php?t=2528952.
In android studio, Fix this issue:
1 Download Genymotion-ARM-Translation_v1.1.zip
download url:
https://forum.xda-developers.com/attachment.php?s=9f1870536cb530a1346794b6ef629e90&attachmentid=2680937&d=1397258016
2 Drag the zip file into your running virtual device and click ok
3 restart Genymotion virtual device

No Android emulators found

I'm trying to setup an Android development environment without Eclipse using this guide.
I've managed to install the SDK and create a new project, but I'm getting an error while trying ant debug install to run the app for the first time:
install:
[echo] Installing /Users/x/work/private/HelloAndroid/bin/HelloAndroid-debug.apk onto default emulator or device...
[exec] error: device not found
And when I try adb devices I get an empty list. Same happens on android list avd, and the .android/avd directory contains nothing.
Do I need to manually install emulators? I thought the SDK included at least a default one. Any help would be greatly appreciated!
No, there are no emulators by default, so you should create at least one. You can do this by clicking the Android Virtual Device Manager icon in the Eclipse toolbar. Hope this helps.
You can do this from the command line by installing Android's SDK with or without Android Studio (a GUI wrapper application I believe). If you're on a Mac you can use Homebrew: brew install android-sdk.
Once that SDK is installed, you simply:
1. Create a Device Definition (only if you need an underlying hardware config that isn't pre-populated within the SDK; e.g. I believe common models like Nexus 7 come pre-installed for use in a new AVD).
1. Create an Android Virtual Device using that newly-created Definition.
Here is a solid guide from Amazon (whose FireOS is an Android mod so there's lots of overlap for building and testing locally for devs).

how do I change the directory of the android virtual device?

I am using Mac OS X, and Eclipse IDE, and when I try to run a sample project, i.e. Snake etc, I cannot access my newly made Android Virtual Device because it was saved to another directory, and not within my workspace, to the best of my understanding.
I tried to modify the run configurations for my project, but cannot detect the AVD because it is in another directory, and I cannot figure how to change this directory and run my sample application.
I am just starting android development, and I cannot even run a sample app. :-( I installed the necessary plug-in and all the necessary packages.
In Eclipse got to Window -> AVD Manager. What do you see there? There is no option to choose a directory to store an AVD and it is not stored within your workspace. If you installed everything correctly you should be able to configure an AVD here in AVD Manager and it will be seen by your Android Project at Run or Debug time. Make sure the API level is correct in the AVD.

Categories

Resources