Kotlin / Kotlin/multiplatform-library-template

Can't use the template without targetting Android

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
340
Forks
61
PR merge metrics
No merged PRs in 30d

Description

The template suggests that you can use it for platforms other than Android. However when you remove the Android target you get this error:

```
Could not create task ':library:bundleAndroidMainClassesToCompileJar'.
Namespace not specified. Specify a namespace in the module's build file like so:
kotlin {
androidLibrary {
namespace = "com.example.namespace"
}
}
```

A KMP library should not mandatorily have to target Android.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure after removing the Android target from the multiplatform library template, then inspect the module build configuration that produces the Android namespace error. Done means the template can be used without targeting Android and the build completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.