Android Studio在KMP/KMM/KN中添加了错误的xcodeproj位置 [英] Android studio adds wrong xcodeproj location in KMP/KMM/KN

查看:65
本文介绍了Android Studio在KMP/KMM/KN中添加了错误的xcodeproj位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图同时运行一个全新的KMM应用程序和以前创建的现有KMM应用程序,并且当我尝试在Android Studio中运行iOS版本时,我没有iOS配置.

当我创建一个iOS配置时,我得到一个必须首先修复的错误.当我按下修复"时,按钮, gradle.properties 文件创建新行 xcodeproj = iosApp/iosApp.xcodeproj

这既是错误的,又是重复的.

如果我删除了重复的 xcodeproj 行中的任何一条,该错误将继续,并且再次修复时,我会得到一条新行.如果重复此过程,您可能还会得到许多新的 xcodeproj 行,所有这些行都位于错误的位置.将位置修改为正确的位置也不能解决问题.

有什么想法吗?似乎是Android Studio 4.1.2中的错误.

以下是Android Studio版本的详细信息:

Android Studio 4.1.2Build#AI-201.8743.12.41.7042882,建于2020年12月19日运行时版本:1.8.0_242-release-1644-b3-6915495 x86_64VM:JetBrains s.r.o的OpenJDK 64位服务器VMmacOS 10.15.7GC:ParNew,ConcurrentMarkSweep内存:1979M核心数:12注册表:ide.new.welcome.screen.force = true,external.system.auto.import.disabled = true,debugger.watches.in.variables = false非捆绑插件:com.intellij.lang.jsgraphql,org.jetbrains.kotlin,com.jetbrains.kmm

解决方案

如果您不想使用Xcode:

该版本似乎存在一些IDE问题,一种选择是降级Kotlin版本.

对我有用的是下载最新的Canary Android Studio并在那里设置我的KMM项目.

希望很快它将在下一版本中稳定

I'm trying to run both a brand new KMM application, and an existing KMM application I had created before, and when I try to run the iOS version out of Android Studio I don't have an iOS configuration.

When I go create an iOS configuration I get an error that must be fixed first. When I push on "fix it" button, the gradle.properties file creates a new line of xcodeproj=iosApp/iosApp.xcodeproj

This is both wrong, and duplicated.

If I remove either of the duplicated xcodeproj lines, the error continues and I get a new line when I fix it (again). If you repeat this process you can also end up with many of the new xcodeproj lines, all with the wrong location. Modifying the location to the correct location also doesn't solve the problem.

Any thoughts? Seems like a bug in Android Studio 4.1.2.

Here are the details of the Android Studio version:

Android Studio 4.1.2 Build #AI-201.8743.12.41.7042882, built on December 19, 2020 Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.15.7 GC: ParNew, ConcurrentMarkSweep Memory: 1979M Cores: 12 Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true, debugger.watches.in.variables=false Non-Bundled Plugins: com.intellij.lang.jsgraphql, org.jetbrains.kotlin, com.jetbrains.kmm

解决方案

If you don't wanna use Xcode:

Look like there is some IDE issues in this versions, one option would be to downgrade the Kotlin version.

What worked for me was to download the latest Canary Android Studio and setup my KMM project there.

Hopefully soon this will be stable for the next versions

这篇关于Android Studio在KMP/KMM/KN中添加了错误的xcodeproj位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆