Hi I am trying to add Xamarin.Firebase.Analytics to my Xamarin Forms app. getting the error below.
My Xamarin.Android AndroidManifest.Xaml is already set to android:targetSdkVersion="33". What else needs to be corrected for this to work?
Xamarin Forms version is: 5.0.0.2545
Package Xamarin.Firebase.Analytics.Impl 116.3.0.7 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Xamarin.Firebase.Analytics.Impl 116.3.0.7 supports:
- monoandroid12.0 (MonoAndroid,Version=v12.0)
This is the visual studio info
Visual Studio Community 2022 for Mac
Version 17.4.3 (build 21)
Runtime
.NET 6.0.12 (64-bit)
Architecture: Arm64
Roslyn (Language Service)
4.4.0-6.22578.12+3c6ab8e1715e5b080fb7bb77070810ab71e09387
NuGet
Version: 6.3.1.1
.NET SDK (Arm64)
SDK: /usr/local/share/dotnet/sdk/7.0.102/Sdks
SDK Versions:
7.0.102
7.0.101
6.0.405
6.0.404
6.0.402
6.0.302
6.0.301
MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks
.NET SDK (x64)
SDK Versions:
6.0.405
6.0.404
6.0.402
6.0.302
6.0.106
6.0.104
5.0.408
5.0.407
3.1.426
3.1.424
3.1.421
3.1.420
3.1.418
.NET Runtime (Arm64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
7.0.2
7.0.1
6.0.13
6.0.12
6.0.10
6.0.7
6.0.6
.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/x64/dotnet
Runtime Versions:
6.0.13
6.0.12
6.0.10
6.0.7
6.0.6
6.0.4
5.0.17
5.0.16
3.1.32
3.1.30
3.1.27
3.1.26
3.1.24
Xamarin Designer
Version: 17.4.0.136
Hash: d49c9ff6d3
Branch: remotes/origin/d17-4
Build date: 2023-01-12 17:32:30 UTC
Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater
Version: 11
Apple Developer Tools
Xcode 14.2 (21534)
Build 14C18
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.
Xamarin.iOS
Version: 16.1.1.27 (Visual Studio Community)
Hash: 933c6c2c9
Branch: xcode14.1
Build date: 2022-11-22 02:00:37-0500
Xamarin.Android
Version: 13.1.0.1 (Visual Studio Community)
Commit: xamarin-android/d17-4/13ba222
Android SDK: /Users/user/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
8.0 (API level 26)
6.0 (API level 23)
12.0 (API level 31)
8.1 (API level 27)
11.0 (API level 30)
10.0 (API level 29)
7.1 (API level 25)
9.0 (API level 28)
13.0 (API level 33)
I have created a project and reproduced your problem. The Xamarin.Firebase.Analytics package only support the android. And the Xamarin.Forms is cross-platform.
So you should only add this package in the project's Android Part, not the pcl. I reproduce the error message when I tried to add it in the pcl. But the project built successfully when I only added it in the android part.
Just right click your project.Android part -> select manage nuget packages -> insatll this package.
Figured it out, need to edit the Android.csproj file.
Replace
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
with
<TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
Related
Hi i'm really struggling to get the Android emulator running on my Mac. What are the steps I need to take to get this working?
I've got Visual Studio 2019 on MacOS Catalina
This is on a new blank Xamarin Forms project
I've tried to go Tools > Device Manager > New Device.
Pixel 3 XL , x86_64, Q 10.
I keep getting this message:
Android emulator component is incomplete therefore the device Pixel 3 XL Q 10.0 - API 29 could not be created. Do you want us to reinstall the Android Emulator?
I've clicked the button to reinstall the android emulator but it doesnt work.
Also tried with OS 8.1 and setting processor as x86 - all the combinations give a similar error messages
When i go to Tools > SDK Manager, the following are ticked:
Android 10.0 - Q
Android SDK Platform 29
Intel x86 Atom_64 System Image
Google APIs Intel x86 Atom_64 System Image
Google APIs Intel x86 Atom System Image
Similar for 9.0, 8.1, 7.1, 7.0, 6.0
Version details
- Version is 8.6.2 (build 6)
Android SDK Manager
Version: 16.6.0.50
Hash: 5901879
Branch: remotes/origin/d16-6
Build date: 2020-04-30 04:01:22 UTC
Android Device Manager
Version: 16.6.0.95
Hash: 45d17b5
Branch: remotes/origin/d16-6
Build date: 2020-04-30 04:01:42 UTC
Xamarin.Android
Version: 10.3.1.4 (Visual Studio Community)
Commit: xamarin-android/d16-6/3a10de9
Android SDK: /Users/user/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
I ended up downloading Android Studio, then running the installers from there and then finally went back to VS Mac and installed an emulator device - that seemed to work.
I am able to solve the issue by creating an XML file named entitlements.xml with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.hypervisor</key>
<true/>
</dict>
</plist>
Then run the following command
codesign -s - --entitlements entitlements.xml --force /Users/macbookpro/Library/Developer/Xamarin/android-sdk-macosx/emulator/qemu/darwin-x86_64/qemu-system-x86_64
to identify your Android SDK installed folder use Visual Studio> Tools > SDK Manager then check the Android SDK path
The latest Appcelerator docs seems to indicate that the max supported version of the Android SDK is Level 26 for Android target version 8.x Oreo.
So I opened Android Studio and uninstalled all other Android SDK Levels per screenshot below, and installed 26:
However, now when I try to run my app on Android 8.0 (Oreo) emulator via Appcelerator Studio I get the following error:
[ERROR] : Unable to find a suitable installed Android SDK that is API >=23 and <=25
When I run appc info from the command line I get this message:
! Android API Android 8.0.0 (android-26) is too new and may or may
not work with Titanium SDK
7.1.0.
The maximum supported Android API level by Titanium SDK 7.1.0 is API level 25.
This seems to contradict the documentation. If Android SDK Level 26 is not supported, then is using Level 25 adequate for building apps that will run on Android 8.0 Oreo?
Here is tooling I have running:
Operating System
Name = Mac OS X
Version = 10.13.3
Architecture = 64bit
# CPUs = 4
Memory = 8589934592
Node.js
Node.js Version = 9.4.0
npm Version = 5.6.0
Titanium CLI
CLI Version = 5.0.14
Titanium SDK
SDK Version = 7.1.0.GA
SDK Path = /Users/.../Library/Application Support/Titanium/mobilesdk/osx/7.1.0.GA
Target Platform = android
It should be supported. I use Titanium SDK 7.1.0 GA with Android API 26 (8.0) and can compile correctly. Maybe you need to change your Android manifest inside the tiapp.xml:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26"/>
</manifest>
</android>
It is supported already, but has not received the whole regression testing so far. Official support if planned for 7.2.0 as part of TIMOB-25852 which will support targets from 23 to 27. Note: This does not influence the minimum target, which will still remain Android 4.1 (API 16).
Edit - Reduced to the root of the problem
I'm getting this error when Multi-Dex is enabled.
CREATEMULTIDEXMAINDEXCLASSLIST : error : Expecting class path separator ':' before '.jar' in argument number 2
I have tracked it down to this jar file being included in the ProGuard command line:
obj/Debug/__library_projects__/DeviceAPI_Android/library_project_imports/DeviceAPI_Android.Jars.cw-deviceapi(2016.05.16).jar
It's the brackets in the file name which are causing the error. I've proved this by running the command in a terminal prompt with this jar file removed, and all works fine.
So the question - where is this file coming from? Is it in Packages? I can't see it there.
If I can find that I should be able to correct the name and build the project.
I've tracked it down to a 3rd party binding library called DeviceAPI_Android.dll, which wraps a jar file for controlling the hardware barcode scanner. The jar file does indeed have the brackets and date in its filename.
So the solution is one or more of:
Get a new version of the binding library from the supplier with a better named jar file.
Rebuild the library myself with a better named jar file. Potentially problematic because I'll have to create the transforms etc. from scratch.
Adjust the build tooling/makefile to make the ProGuard command line more resilient to strangely named jar files.
A sample project demonstrating the problem is on GitHub here.
Version Information:
=== Visual Studio Community 2017 for Mac ===
Version 7.1 (build 1297)
Installation UUID: 650b4c91-c7f5-4ee5-ad70-6f178f314906
Runtime:
Mono 5.2.0.215 (d15-3/da80840) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 502000215
=== NuGet ===
Version: 4.3.0.2418
=== .NET Core ===
Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Version: 7.4.0.21 (Visual Studio Community)
Android SDK: /Users/jameslavery/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.5
SDK Build Tools Version: 25.0.3
Java SDK: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Apple Developer Tools ===
Xcode 8.0 (11246)
Build 8A218a
=== Xamarin.iOS ===
Version: 10.12.0.20 (Visual Studio Community)
Hash: 80b8487d
Branch: d15-3
Build date: 2017-08-18 16:07:26-0400
=== Xamarin.Mac ===
Version: 3.6.0.19 (Visual Studio Community)
=== Xamarin Inspector ===
Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT
=== Build Information ===
Release ID: 701001297
Git revision: 9c5299666538b2f8baf501418a5c064d784d64da
Build date: 2017-08-07 11:29:35-04
Xamarin addins: 3bb0c32a14f1b7e368bf5ac53a84c3581c019391
Build lane: monodevelop-lion-d15-3
=== Operating System ===
Mac OS X 10.11.6
Darwin 15.6.0 Darwin Kernel Version 15.6.0
Thu Jun 23 18:25:34 PDT 2016
root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
=== Enabled user installed addins ===
LiveXAML 1.0
Redth's Addins 1.0.9
I have reported the following bug for this issue:
https://bugzilla.xamarin.com/show_bug.cgi?id=59237
Please feel free to CC yourself to this issue to be notified when it gets fixed. For the time being, you will have to workaround this by renaming the .jar in some fashion.
I hope this helps!
This is because there is a binding library with an embedded Jar file with brackets in its filename - which cause the command line for ProGuard to fail.
#jondouglas has submitted Xamarin bug 59237 for this. Hopefully the fix will be to make the command line for ProGuard more resilient to strangely named files.
In the meantime, I will have to get hold of an updated binding library with the embedded jar file not having a name with parentheses (or other character which breaks a command line) in it.
Thanks to #jondouglas for his help in diagnosing the problem.
I updated my Xamarin Studio to the latest version today, and now I get errors compiling my apps.
I get the following error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: Failed to resolve Android.Runtime.JavaArray1<!0> Android.Runtime.JavaArray1::FromJniHandle(System.IntPtr,Android.Runtime.JniHandleOwnership) (ProjectABC)
Any ideas ?
=== Xamarin Studio ===
Version 4.0.8 (build 2)
Installation UUID: 11c63c7f-e0be-4066-b8f0-39f8a0635818
Runtime:
Mono 2.10.12 (mono-2-10/c9b270d)
GTK 2.24.16
GTK# (2.12.0.0)
Package version: 210120000
=== Apple Developer Tools ===
Xcode 4.6.2 (2067.2)
Build 4H1003
=== Xamarin.iOS ===
Version: 6.2.7.1 (Enterprise Edition)
Hash: 947e664
Branch:
Build date: 2013-30-05 18:02:40-0400
=== Xamarin.Mac ===
Xamarin.Mac: Not Installed
=== Xamarin.Android ===
Version: 4.6.8 (Enterprise Edition)
Android SDK: /Users/stephen/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
Java SDK: /usr
=== Build Information ===
Release ID: 400080002
Git revision: 0a09117dec1aed78c735ac46f7a50ae7d12f7a7a
Build date: 2013-05-16 19:36:29+0000
Xamarin addins: 78d0437c3f92ae13042f81e5fd9487e2c28d5fbc
=== Operating System ===
Mac OS X 10.8.3
Darwin localhost 12.3.0 Darwin Kernel Version 12.3.0
Sun Jan 6 22:37:10 PST 2013
root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
This propably was because of the new version of Xamarin Studio not supporting your current installed Java version, please consider deleting this question as i don't think is helpful anymore after 2 years.
I have the following versions of Andorid and Java SDKs in the following environment.
I am trying to develop a SIP application but while Android.net.http and Android.net.wifi are both present, the needed Android.net.sip doesn't appear.
I'm assuming that this has something to do with the android SDK (version or perhaps mismatch to Java SDK version) but I haven't been able to find any information on this type of issue or much in general on SIP application support in Mono.
I'd appreciate if it someone can steer me in a direction in terms of finding the problem of the missing .sip assembly.
MonoDevelop 3.0.3.2
Installation UUID: 6e3978d7-9762-4c5a-80ee-c19e6a271794
Runtime:
Microsoft .NET 4.0.30319.269
GTK 2.16.6
GTK# (2.12.0.0)
Mono for Android: 4.2.3.68199851
Android SDK: C:\Android\android_sdk\android-sdk
Supported Android versions:
Version: 1.6 ApiLevel: 4
Version: 2.1 ApiLevel: 7
Version: 2.2 ApiLevel: 8
Version: 2.3 ApiLevel: 10
Version: 3.1 ApiLevel: 12
Version: 4.0 ApiLevel: 14
Version: 4.0.3 ApiLevel: 15
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_27\bin
No build info
Operating System:
Windows 6.1.7601.65536 (64-bit)
Answered my question by looking at my comment. I had the compatibility level set to 2.2 which was obviously before API level 9. Set the compatibility level up to 2.2.5 (API Level 9) and everything showed up.