Skip to content

Commit 5a479c4

Browse files
zhu-xiaoweixiaoweii
andauthored
chore: add troubleshooting in readme (#18)
Co-authored-by: xiaoweii <[email protected]>
1 parent e96c3ef commit 5a479c4

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
}
2525
```
2626

27-
then sync your project.
27+
then sync your project, if you have problem to build your app, please check [troubleshooting](#Troubleshooting)
2828

2929
**2.Parameter configuration**
3030

@@ -210,6 +210,30 @@ open an terminal window, at the root project folder to execute:
210210
./gradlew build -p clickstream
211211
```
212212

213+
## Troubleshooting
214+
215+
#### Problem: Duplicate class for kotlin-stdlib:1.8.x
216+
217+
If your project use kotlin 1.7 or lower, you may have this problem, you can choose one of the following three ways to fix it.
218+
219+
1. Upgrade your kotlin version to 1.8
220+
221+
2. Add bom library to your app module's `build.gradle` file, it will align the kotlin version with 1.8
222+
223+
```kotlin
224+
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.10"))
225+
```
226+
227+
3. add `resolutionStrategy` to your app module's `build.gradle` file to force specifying your kotlin version to build.
228+
229+
```kotlin
230+
configurations.all {
231+
resolutionStrategy {
232+
force("org.jetbrains.kotlin:kotlin-stdlib:1.7.20")
233+
}
234+
}
235+
```
236+
213237
## Security
214238

215239
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

0 commit comments

Comments
 (0)