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.
Related
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>
I'm trying to create a Android project with MvvmCross.
But I'm trying to target MonoDroid 8.0 which is API-26 Android Oreo 8.0. Cause my test device is this and cannot be upgraded to 8.1.
But when trying to install any Mvvmcross.Droid package I get a
Package MvvmCross.Droid.Support.Design 6.0.1 is not compatible with
monoandroid80 (MonoAndroid,Version=v8.0)
Does that mean if I'm trying to target any older version other than 8.1 I cannot use Mvvmcross 6.0 and have to use older versions of Mvvmcross?
If anybody else if facing a similar problem.
Note : MVVMCross 6 targets minimum MonoDroid 8.1 which is API 27 and you need to install them in order for the app to compile and run on any versions of Android.
So solved this by installing the API 27 sdk and making sure the Target Version is set to API 27 or 8.1 version.
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).
I am using JDK8x64 (only) with Android Studio 2.1 and targeting Android 4+.
Here I think this JDK8x64 used for build system itself, not for exporting to Android. (So it is OK, because Java 8 is backward compatible). (OS: Win7x64)
But according to: https://forums.xamarin.com/discussion/48581/use-of-jdk-8-with-xamarin-android
Is it true that Building with JDK8 makes the app not works on older Android OS versions?
Any experience?
And what about JDK 8 with Xamarin Android?
You can use JDK 8 and the compiler will only use the features of Java that are available (you will not be able to use the latest features introduced in JDK 8 such as lambdas, otherwise you will get an error).
However, if you target Android N, you will be able to use OpenJDK 8's features, some of which are backward compatible with previous versions of Android (e.g. lambdas and method references are backwards compatible). To see what's available, check here:
Supported Java 8 Language Features and APIs
We been using v8 since it was released and have not had any problems within Xamarin.Android apps (or Java binding libraries):
>javac -version
javac 1.8.0_92
>java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
That said, Xamarin website does state:
OS-X Requirements
Xamarin.Android requires the following for use with Xamarin Studio on a Mac:
Java JDK 7 (1.7)
If you are developing solely for Android versions older than Android 5.0 Lollipop (API 21), Java JDK 6 (1.6) can still be used. Later versions of the JDK can also be installed to run alongside JDK 6 or JDK 7 if required by your machine.
Windows Requirements:
Xamarin.Android also requires that a 32-bit Java JDK 7 (1.7) be installed.
Later versions of the JDK can also be installed alongside JDK 7, if required by your machine.
To answer your question, yes this is true. But Android Studio tends to handle this for you, as stated by #tyczj. Lets say for example you are building an app from JDK8 for your Android 4+, but I want to run that same app on my Android 2.3, which I still have. It might not work due to compatibility issues. Although Android Studio takes care of this by allowing you to specify which version(s) you would like to support, it wouldn't hurt to look at differences between JDK8 and say, JDK6.
I want to use uiautomator or uiautomatorviewer for Android test automation.
Can I use these tools on any Android device?
You must have a device with Android OS version 4.1 (JELLY_BEAN, API level 16) at minimum. Documentation reference:
To use these tools, you must have the following versions of the Android development tools installed:
Android SDK Tools, Revision 21 or higher
Android SDK Platform, API 16 or higher