Hi team I'm facing issue while importing maven hos...
# multiplatform
r
Hi team I'm facing issue while importing maven hosted KMM library in native project
Copy code
Null extracted folder for artifact: ResolvedArtifact(componentIdentifier=<http://live.pw:pitaraShared-android:0.0.1|live.pw:pitaraShared-android:0.0.1>, variant=<http://live.pw:pitaraShared-android:0.0.1|live.pw:pitaraShared-android:0.0.1> variant releaseApiElements-published, variantName=null, artifactFile=/Users/rohitchoudhary/.gradle/caches/modules-2/files-2.1/live.pw/pitaraShared-android/0.0.1/3b4bc18e03e42d5571816314b89f193326f04141/pitaraShared-release.aar, isTestFixturesArtifact=false, extractedFolder=null, publishedLintJar=null, dependencyType=ANDROID, isWrappedModule=false, buildMapping=
when im doing, it is importing, but rest of main code showing error
Copy code
android.enableJetifier=true
w
what does your build.gradle.kts look like? how about your libs catalog?
r
Copy code
implementation("<http://live.pw:pitaraShared:0.0.1|live.pw:pitaraShared:0.0.1>")
w
Ok, and what platform is the native project targeting? Does pitaraShared also support the same platform, if not all code is in its common module?
r
No all code is not in common module, But both are tageting same platform
When im trying to import it in new project it is getting import but not in my main aap
w
change implementation in main app to api
r
Copy code
buildConfig_compileSdk = 34
buildConfig_targetSdk = 34
buildConfig_minSdk = 24
w
instead of implementation, api() for your declared library dependency
that way it is exposed from common kotlin code and you can call it in android code
r
I tried that approach but it is not working sir
w
Wait, sorry. That’s just for classes required for your library