I am trying to add a map on the Xamarin.Android application. So far, I have added only map, I did not add any location listener. However, I keep getting the following error
package,com.google.gms.location does not exist
I wonder what I am missing or doing wrong?
Here is the dll's added into the references from the nuget
Make sure all packages are of the same version (27.0.0)
Make sure Xamarin.Build.Download is installed (it downloads the required .jar files etc.)
Clean & Rebuild the android Project
Try entering Update-Package -Reinstall Xamarin.GooglePlayServices.Locationinto the package manager console
Clean & Rebuild the android Project
Try a higher version number of the package (newer ones are stable too)
If you want to use GooglePlayService. The test device/emulator of your app needs to include Google API. If you are using an emulator you can follow the steps below:
Download Google API System Image for your android API Level through Tools->Android->Android SDK Manager(ex for API Level 25 ):
Create a new Google API Emulator through Tools->Android->Android Emulator Manager->Create:
Clean your project and rebuild it, run your project in this emulator.
Related
I am trying to install this particular package into my program and get the following error:
Error Could not install package 'Xamarin.Android.Support.Compat
24.2.1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', but the package does not contain
any assembly references or content files that are compatible with that
framework. For more information, contact the package author.
What exactly is my project suppost to target and how do I make this change? I already installed android 7, however I cannot even target that for some strange reason. Not even if I make a new project I can't target that.
This package requires MonoAndroid70 to be installed. Thus you need to ensure your TargetFrameworkVersion is set to a minimum of Android 7.0. You will need to install API 24(7.0) and change the version.
https://developer.xamarin.com/guides/android/application_fundamentals/understanding_android_api_levels/#framework
For those interested in how you would find this, you can download the .nupkg from NuGet:
https://www.nuget.org/api/v2/package/Xamarin.Android.Support.v4/24.2.1
You can then extract the .nupkg and view the lib folder which will show you what the library supports.
I recommend below steps
1- download a previous version (
<package id="Xamarin.Android.Support.v4" version="23.1.1.1" targetFramework="monoandroid60" />
)
2- delete the following local folder "..\AppData\Local\Xamarin"
3- Build the droid project (it will take some times)
Finally, no more issues with these xamarin support packages.
Cheers UP!
The solution:
Try to update your xamarin visual Studio after you will install it and you will get monoandroid v7
update your android sdk Api 24 or api 25
I think it will help you.
I removed from the Android SDK all API dependencies 23, ie Android 6.0 and installed from 7.0 and 7.1 (AP 24 and 25).
Clean and Rebuild the project.
Done that, it worked correctly.
Hope this helps.
I'm using Android Studio 1.5.1 and install every package needed using SDK Manager. I choose to use API 21 and install all the package under this API. But when I open a project, i get no preview but this.
File C:\Users\uyung\AppData\Local\Android\android-sdk\platforms\android-21\data\layoutlib.jar doesnt exist
Some people suggest to install another API package. But unfortunately I have limit storage at my partition. Any idea to make the preview work?
i delet my sdk platform and downlod it again. error fixed.
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.
I have created a few projects with the MasterDetailFlow using API 11 earlier.
I needed to add LoginActivity so I downloaded the needed SDKs and updated the SDK tools to rev 22.2
http://prntscr.com/1rzb9j
Now that it is updated, when I use the wizard to create a new MasterDetailFlow project, or when adding an Activity template such as LoginActivity (to my previously created project having MasterDetailFlow layout) it says that the Android Support Library is not available or is outdated.
http://prntscr.com/1rzbc5
This template depends on the Android Support library, which is either not installed, or the template depends on a more recent version than the one you have installed.
Required version: 8
Installed version: 18
I have tried Uninstalling and reinstalling via the Wizard, to no avail
(as advised here Not able to create new Project with ADT version 20)
After I uninstall and run the wizard- the Installed version shows "not available" and thus I click on "Install/Upgrade"; where it installs and shows that the Installed version is 18 but the next and finish buttons are disabled, and "Check Again" does nothing.
I have also tried manually installing also, going back to version 8, even then it says:
Required version: 8
Installed version: 8
Here too, the next button is disabled, and check again does nothing.
I repeated the above said solutions many times, and no luck. I am thinking it might be something else that is wrong. Any ideas?
Try google app inventor for creating android applications. Its easier and lot more simple.
Solved.
https://code.google.com/p/android/issues/detail?id=60149#c55
Hi everyone,
This one is my bad. I was in the middle of changing the dependency
system used by the templates and a transient state got picked up into
this tools build. The templates have settled in the AOSP master
branch.
I've attached a snapshot of the current Activities templates.
Replacing your sdk/tools/templates/activities folder with the contents
of this zip should resolve this issue.
I apologize for the inconvenience.
Download the given file and replace it with the templates, and it works fine.
install the platforms and extras in the sdk better install all there is to install in the sdk
gen folder is missing is the issue.The build patch failed .I have tried all solutions posted previously on this and no luck.
EDIT
To make it clear here is my original post
https://salesforce.stackexchange.com/questions/9460/encountering-issues-while-developing-android-hybrid-mobile-app
I am using salesforce SDK but when i am creating hello world app using native its working fine
Even if you delete the gen folder, it'll regenerate it after you compile your program.But if it is not then try creating a new project and try it again .If not , try a fresh installation of the API.
Update
Hmm, everyone in both posts is telling you to download the "SDK Platform" for "Android 2.2 (API 8)". I really, really recommend trying this. It is apparently required by the library you added to your project...
I have 4.2 and 4.1 .Is that not enough?
No, you must have the older platforms that you are building against.
Simply download it and open Project > Properties, click on Android, then select Android 2.2. After all this clean your project and save it.
Original Answer
The screenshot doesn't give us much detail, but:
Unable to Resolve target 'android-8'
Tells me that you probably don't have the SDK Platform for API 8, simply download this through the SDK Manager. Or you can change any references in your manifest and the rest of your code to use an API that you already have.
I think it is because when
you import a project, build
target is not set in the
project properties which
then default to the value
used in manifest file. and make sure you have API 8.
The solution is to enable
build target toward your
installed API level (but keep
the minimum api support as
specified in the manifest
file).