hi, I'm trying to set up a multiplatform mobile pr...
# multiplatform
t
hi, I'm trying to set up a multiplatform mobile project, is there a plugin that fixes iOS platform imports? I'm developing in Linux
t
awesome, thank you so much!
j
@louiscad I'd been intending to check out this plugin 👆 on my Windows and Linux environments and this post reminded me. But after adding it on Windows, I'm getting this error during gradle sync:
Copy code
* What went wrong:
Execution failed for task ':my-lib:commonizeCInterop'.
> Process 'command 'C:\Program Files\Android\Android Studio\jre\bin\java.exe'' could not be started because the command line exceed operating system limits.
After removing the plugin, the error continues. Even after cleaning, invalidating AS caches, and
git clean
the error persists. Any idea what the plugin might have changed that would be causing this? The long path seems to be related to commonizing the cinterop for the native library I'm using. It only affects the AS gradle sync. Building and running tests works fine.
l
After removing the plugin, the error continues.
Then the error probably isn't in the plugin?
j
That's what I'd think, except everything has worked without error right up until adding the plugin. I've never seen this error before, and the only change I made was adding the plugin when it started.
Are there any changes the plugin makes that aren't reverted by removing the plugin from the build.gradle.kts?
l
Copying some files in
~/.konan
I think commonizer doesn't work on your OS for some reason
Is the project open source?
j
Not currently. I plan to likely open source it in the future.
l
How modules does the project have?
j
Two. The main kmp library and an add-on ktx extensions library.
l
If the project is on private GitHub, you can add me as a collaborator so I can take a look
j
Both target Android, JVM, iOS, and macOS. I'm in the process of adding Windows and Linux support, which uses a different native C library than iOS/macOS, which uses the ObjC library.
l
It it requires Obj-C stuff, I doubt it's going to resolve on Windows, but I might be wrong
j
My goal with adding the plugin was mostly to get rid of the IDE errors with all the cocoa platform libs in the Apple source set while working on Windows or Linux. I'm constantly switching between Mac, Windows, and Linux running tests for each of the targets. I'm sure the ObjC cinterop will still show errors, since the cocoapods plugin won't work without macOS.
Thanks for the help. I'll look at it some more and see if I can narrow down anything and add you to the repo to look at it more, if that helps. I'll be AFK shortly.
I can confirm if I delete the
~/.konan
directory and run the gradle sync without the plugin the error goes away. If I then add the plugin and re-run the gradle sync the error returns.