I am trying to run the initial example apps generated by the Kotlin Multi Platform Mobile plugin in Android Studio. I followed these steps for my environment setup. The Android Simulator runs correctly, but the iPhone Simulator does not. The Run Configuration has the following error:
Error: Selected scheme "iosApp" does not support "iphonesimulator"
When I run the configuration (ignoring the error), the iPhone simulator does open and appears to load iOS, but it never loads the "Hello, iOS" application that is in Android Studio.
What would cause this?
Version Information:
macOS 12.2.1
Android Studio 2021.1.1 Patch 2
Xcode 13.3
I fixed it with the following method.
Please close the Android Studio.
Go to ~/Library/LaunchAgents/ folder and delete com.jetbrains.AppCode.BridgeService.plist there.
Launch Android Studio with the KMM plugin again. It should work now.
From my tests, it seems that there may be multiple reasons for which we receive this error:
the root folder of the ios project has a different name than the .xcodeproject file. Sometimes it works even if they are different and maybe it matters if we change this name after the frameworks was already connected to the iOS project.
"Other linker flags" were manually copied and they were not copied using the copy button from the Connect the framework to your iOS project. This results to wrong data like:
"$(inherited)",
"-framework",
"shared\n",
instead of
"$(inherited)",
"-framework",
shared,
I managed to fix this by going into Edit Configurations on Android Studio and choosing the location of my XCode project file again. I believe this is an error of the KMM plugin in Android Studio and has yet to be fixed.
Updating Android Studio and KMM plugin worked for me.
I am trying to enable Firebase Analytics in my Xamarin Forms project. The iOS version goes very well, however, when adding nuget packages in Android project I am getting error while building my project. I am following Using Firebase Analytics in your Xamarin.Forms app to enable firebase in my app. I have added
Xamarin.FireBase.Analytics and Xamarin.FireBase.Analytics.Impl
Nugets. while running my app I am getting weired error attached in the screenshot. Clicking any of those errors takes me to a file "values.xml". In fact there are two identical values.xml files (these files are not located in my android project, but opens when clicking on the errors)
After switch on aapt2 for build the issue was solved for me
i had the same issue with the new 116+ versions.. downgrade to version 71.xx and it solves the problem
I want to run the xamarin ios project and maybe its native code for ios xamarin.
I install visual studio for mac and open the project, then add missing packages.
But in One package Zxing.Mobile I get the error (I can't find relative package) So I comment related code and try to run the project. So I get the few errors and here I attached that snap
So please help me I'm iOS native developer and want to run this xamarin project.
This error generally occurs when a dependency of your nuget package is having an issue and can't be linked. You can try installing the dependency nuget package manually and that should resolve it.
I'm trying to build an application using telegram API on Android Studio. I've some problems about NDK or ndk path. All of things in Android Studio are updated. I downloaded the telegram source code and set up the bots. When I try to compile the source code on Android studio, get an error like the one shown in the picture in the link. The source code and SDK under files in root directory. Thank you for your supporting.
http://i.hizliresim.com/dB2Xr4.png
I got this error when try to start Android solution in Xamarin Live Player on VS2017.
"Dependent project xx.csproj failed to build, using old version"
Any clue? Thanks.