I just switched from IntelliJ to Xamarin and, man, am I regretting it. Can anyone help me with this error?
I have a Xamarin.Forms project with .NET standard sharing strategy. I'm receiving the error:
com.xamarin.forms.platform.android does not exist
followed by about 100 errors:
... cannot find symbol.
If I create a new project, the errors still occur.
Android manifest
Minimum version is Android 8.0 (API Level 26 -Oreo)
Target version is the same.
I have also tried each and both with Use Compile using SDK version.
Android SDK
Installed platforms are Android SDK Platform 27 and Android 8.0 - Oreo
Installed Tools are Android SDK 26.1.1 and 27.0.1.
Build tools are all from 26.0.0 to 27.0.3.
Emulator 27.1.7
NuGet - Solution
All packages updated.
Xamarin.Forms version v2.5.0.280555
Android Emulator Manager
Operating System is Android 8.0 - Oreo(API 26)
The only advice I can find is on SO ... and it is to check manifest versions. I'm at a loss now and am unable to work on any project, have lost three days trying to solve it ... and am very close to switching back to IntelliJ. Does anyone have any ideas?
Related
I am developing an Android app in Visual Studio. In the Android SDK manager, all API's from API level 23 (Android 6.0) to API level 25 (Android 7.1) are installed.
But when I open the project properties in Visual Studio, the "Compile using Android version" option is showing apis only till 23(Android 6.0). I want to target 7.1 as most of the smartphones will now have it.
There are another problem if I go with Android 6.0. Some packages like Xamarin.Firebase.Messaging fails to install with the following error.
Install-Package: Could not install package 'Xamarin.Firebase.Messaging 42.1001.0'.
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.
I can see that all options available under API level 25 are installed in SDK manager. Kindly help me so that i can target Android 7.1 from the Visual Studio Android app. Thanks
Is your Xamarin installation up to date? I suspect that your version of Xamarin.Android is 6.x which means that you won't be able to target Android 7.0 or 7.1 even if they are installed through the SDK manager. You can check the version from Help > About Microsoft Visual Studio.
For example, my version is 7.1.0.19 and I'm able to target Androd 7.1 just fine.
To check for updates, you should open Tools > Options > Xamarin > Other and click Check now.
Update for Visual Studio 2017:
If you're using Visual Studio 2017 or newer, Xamarin updates are delivered as part of Visual Studio updates. To manually check for updates, go to Tools > Extensions and Updates... In the left hand menu, open Updates and select Product Updates. If there are updates available, they will be shown on this list.
In Visual Studio 2017 preview there is an improved Google Android emulation support with a new Android emulator that's built into Visual Studio (this supercedes the Visual Studio Emulator for Android):
I checked it this morning and it had Android emulators up to API 27 including Oreo.
However, I did try to trigger API 28 P-Type even switching the SDK Manager from the Microsoft repository to the Google repository but it still didn't show up, but, at least you got everything you need up to API 27.
References:
https://www.visualstudio.com/vs/preview/
https://blog.xamarin.com/3-reasons-to-try-visual-studio-2017-version-15-4-previews/
I have downloaded some projects of android apk to learn from it ..
i try to open it using the latest version of android studio (2.2.3) , but it's take too long time and then stop ,I looked for a solution to this problem and found that these applications were built on previous versions of the sdk So to solve this problem, I should use an earlier version of Android Studio, so I want to know what is the Android studio version which have Android 5.1 (API level 22).
You can have a single installation of Android Studio and all the SDKs you want to use (partially or fully installed)
You have to download the sdk via sdk manager download the latest sdk
I'm following the guide for setting up the Android N Preview https://developer.android.com/preview/setup-sdk.html
In "Update or Create a Project" Google says I need to have 24.0.0 platform tools.
Just be sure that you've updated your project to use Android SDK Build
Tools 24.0.0 and Android SDK Platform-Tools 24.0.0.
I have installed the new SDK Platform: Android 6.X (N), API Level 24, Revision 1. However when I open SDK Tools the only Android SDK Platform-Tools version is 23.1.
I have updated my build.gradle for Android 24 and for Jack and Java 8 (see).
Everything works great on Android 24 simulator but crashes on a device or simulator running Android 22/23 (less than 24) with the following error:
java.lang.NoSuchMethodError: No virtual method
stream()Ljava/util/stream/Stream; in class Ljava/util/ArrayList; or
its super classes (declaration of 'java.util.ArrayList' appears in
/system/framework/core-libart.jar)
I suspect the cause is having SDK Platform-Tools version 23.1.0 instead of 24.0.0 but if there is another solution i'd be happy to hear it.
Edit
Installing platform tools 24.0.0 rc1 did not fix the crash.
I'm not sure what else to try given that I have followed all the instructions to setup the preview and the Jack compiler.
but crashes on a device or simulator running Android 22/23 (less than 24) with the following error
java.util.stream.Stream was added in API Level 24. This class cannot be used on older devices.
Certain Java 8 features, like lambda expressions, may work on older devices, but not classes that were introduced in Android N.
Just select the show package details and then you can find all the versions. Refer to the attached image
Asuming you have Android Studio 2.1
Launch the standalone SDK manager.
From there Android N API 24 should be available to install
Your API level 24 app runs OK with Android 24 (virtual) device but doesn't work with pre-24 device - so everything is exactly as one would expect.
So I just reinstalled the lastest version of Xamarin after a clean install of my laptop. There were no errors during the Xamarin install, so everything seemed okay. However, I went to open an existing project based on Android 3.1 (API 12) and got the following error when I compiled:
Unsupported or invalid $(TargetFrameworkVersion) value of 'v3.1'. Please update your Project Options.
Checked out my project properties and found that both the Compile and Target Android version combos were blank. I have several versions listed in the combos, but v3.1 (API 12) is nowhere to be found. When I look in the Android SDK Manager, it shows that Android 3.1 (API 12) is installed. Anyone know why it would be missing in Visual Studio/Xamarin?
We removed some of the API levels. Your application can still run on these completely fine, but you can't use them to Compile against or to Target. You will want to set your Target Framework the latest version API 21 currently and set the Minimum to the minimum you want. I usually recommend Target = 21, Minimum either 15 or 10 based on AppCompat that you need.
http://developer.xamarin.com/releases/android/xamarin.android_5/xamarin.android_5.1/#Removal_of_API_Levels
I just installed android 2.1 SDK in eclipse and created a project targeted for Google API:7. Eclipse shows an error on the project icon, and the debug window shows this error
ERROR: Unknown command 'crunch'
Android Asset Packaging Tool
After quite a lot of googling, I still have no idea how to fix this error. I have already tried cleaning up the project.
This happened to me too when I updated Eclipse from Helios to Indigo (on Windows XP)
Solution was to open Android SDK Manager and install all the default selected updates, notably I was on
Android SDK Tools rev 13
Android SDK Platform Tools rev 7
These updated to
Android SDK Tools rev 14
Android SDK Platform Tools rev 8
My project which targets 2.2 compiles and runs in debug now without any problems (NB I have all the SDKs installed including 4.0 but you can still target earlier SDKs)
I think the problem has a generic cause ==> Partial ADT Update
Check your repositories again and then this link