Am running a project on android using eclipse IDE , on trying to run the map view i could do that enabling the google map view and using the uses library . But when it comes to the AVD it shows an error. saying the target API is not ssupporting maps (I did try creating a new AVD). Please help me out
Please make your target as "Google APIs" corresponding to ur version which u want to use.
From the name of your emulator.. I guess you will be using an app which has maps. If yes, you need to create the AVD using Google API with the right API Level (and not normal AVD). If you can't find Google API within your "Android SDK & AVD Manager", you need to install from the "Available Packages" option
Related
I have downloaded SDK tools and installed Google API's Intal x86 Atom image, however when I want to create my AVD it sais there is no system images installed for this target. BUT I have downloaded everything. I am using Ubuntu, on Windows machine same configuration works perfect, also for my colleagues same configuration works just fine.
If I select as target Android API 23, not Google API's it's okay, but I don't need Android API, since it's not working for me. I saw lots of reported defect, but none of them could help me.
Anyone has any idea that's going on there?
I had the same problem myself today and I found a bug report:
https://code.google.com/p/android/issues/detail?id=210223
To quote the solution:
There seems to be some underlining refactoring which means the configuration now required is:
Target = Android X.X - API Level XX
CPU/ABI = Google APIs Intel Atom (x86)
So, to create a new AVD with Google APIs support, just don't pick Google APIs as the Target. Pick generic Android with desired API level as the Target and then pick your desired Google APIs version in CPU/ABI. It works just fine, you will get Google Maps etc. on the AVD.
About that "but I don't need Android API, since it's not working for me" - I'm not sure what do you mean. You can't have Google APIs without using Android APIs, because Google APIs are running on Android device.
My problem is that my Android Virtual Device (AVD) doesnt update when I update my code.
For instance, I run the AVD with my first code. Then I make some changes in the code (removing stuff and adding stuff). But still, the things that are shown on my AVD are from the old code. Stuff that should be there because I removed it from the code are still there when I run my AVD. And of course the new stuff isnt there.
I do:
Save my new changes.
Restart my AVD
But still it doesnt work.
If I restart my computer the changes might appear... help!
What helped me sometimes was deleting the old apk that was saved. For some reason it wasn't running replacing the old apk to be installed on the avd properly.
Also...more info could help. Are you running the code through eclipse/android studio/command line? Is your android application native or running html with the help of phonegap?
There is no need to restart the AVD. The thing you have to do is to reinstall yout application. Clicking Run in Eclipse will do the job.
I used the wrong API for my development. I used 20 when my book told me 17.
The Target was wrong. Used: "Android 4.4W.2 - API Level 20" but needed to use: "Google APIs (Google Inc.) - API Level 17"
I thought a higher API would be able to handle all lesser API numbers.
I dont know the difference between Targets "Android 4.2.2 - API Level 17" and "Google APIs (Google Inc.) - API Level 17" though.
Anyway all my problems seems to be resolved now.
im new to android programming and im trying to create an android app that loads google maps v2.
I got api key, my code is working with no errors, i'v used some guide to write the code
But here's the problem : if im using min Sdk Version 8 my app crash and not even starts.
if im trying higher Sdk Version i cant test it because i dont have any device besides galaxy s2 and google maps v2 cant load in the emulator.
I will be glad to hear some advices.
Use SupportMapFragment from a FragmentActivity, instead of MapFragment from an Activity. To use fragments on devices older than API Level 11, you need to use the Android Support package's backport of fragments (where FragmentActivity comes from).
http://android-er.blogspot.de/2012/12/using-supportmapfragment.html
Also Please check below step..
check if the "libs" folder containing the "android-support-v4.jar" exists in your project.
"android-support-v4.jar" is located in "/extras/android/compatibility/v4/android-support-v4.jar" under your "android-sdk" drectory.
Before running your project, you must set your project Build target to "Google APIs", not Android x.x. version : Select your project and click Project > Properties > Project Build Target in Eclipse and select any "Google APIs ", and then run your project on your phone. If you use the emulator, also MUST set the AVD of the emulator to the any "Google APIs ".
Once more, you don't need to create the new Google Maps API key in order to test your project, Just use the default provided API key, which is shown as "Key for browser apps (with referers) "in your Google APIs Console.
Finally, the most important is to add Google Play services as an Android library project as follows:
Select File > Import > Android > Existing Android Code Into Workspace and click Next. Select Browse..., enter /extras/google/google_play_services/libproject/google-play-services_lib, and click Finish.
https://developers.google.com/maps/documentation/android/start
reference link
Google maps v2 on android devices with minSDK below 11
Google has stop supporting android api version below 9, So if you are building new app set your min sdk level to 9.
And to test the google map you can use emulator just open sdk manager and install android latest version 4.4, build new emulator configured with android 4.4 and you can run google map in it. Hope this will help you
The problem I'm having is I've downloaded the Google API's and can't seem to select them as the target for an AVD ?
Included a screenshot to clear up a few things. Like that I've actually (as far as I can tell installed the Google APIS)
When I try to select Google APIS as a target the only option is Android 4.4 API Level 19
Restarting Eclipse will help you!
I wrote a simple code which implements MapView using Eclipse and ADT plug-in updated today. in order to test it I created a new emulator based on Galaxy Nexus device and target for Google APIs level 17. The emulator has been created without errors and starts properly.
I set project properties for targeting Google APIs. I compiled the project and I tried to run in on my emulator, but I got a warning message: No compatible targets were found, Do you wish to add a new Android Virtual Device?
Independently on the button I click, a new avd windows appear and my new emulator is highlighted by a red cross instead of the green check sign.
I can choose to ignore the warning and continue with my emulator, but my application blocks before reaching main activity onCreate() method I am sure because I have placed a breakpoint inside the method which is never reached.
I added internet permission tag to manifest ans API keycode I got from Google.
Is anyone able to explain me what is the problem with my project?
Thank you very much.
If you used Google APIs level 17 as the target of your project, make sure your emulator's API level is also 17.
You could have possibly created an emulator using Google API but the API level is different.
To check the emulator's API level, open your AVD, then confirm if target name is Google APIs(Google Inc.) and API level is 17.