You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/rive.md
+86-1Lines changed: 86 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,24 @@ For Android, add this provider to your `AndroidManifest.xml` inside the `applica
74
74
</provider>
75
75
```
76
76
77
+
#### Gradle settings
78
+
79
+
Add this to your `app.gradle` inside the `android` section:
80
+
81
+
```yml
82
+
kotlinOptions {
83
+
jvmTarget = '1.8'
84
+
}
85
+
```
86
+
87
+
Ensure your gradle settings are setup to use Kotlin by adding a `gradle.properties` file (right next to your `app.gradle`) with the following:
88
+
89
+
```yml
90
+
useKotlin=true
91
+
```
92
+
93
+
## RiveView
94
+
77
95
Use `RiveView`:
78
96
79
97
```xml
@@ -89,7 +107,7 @@ Use `RiveView`:
89
107
</Page>
90
108
```
91
109
92
-
When using flavors, you can just register the element for usage in your markup:
110
+
When using flavors, you can register the element for usage in your markup:
93
111
94
112
```ts
95
113
import { RiveView } from'@nativescript/rive'
@@ -156,6 +174,73 @@ function loadedRive(args) {
156
174
}
157
175
```
158
176
177
+
## Troubleshooting
178
+
179
+
When configuring your Android app for Rive you may run into the following issues. Here's some solutions.
180
+
181
+
### Potential Error 1
182
+
183
+
```
184
+
Execution failed for task ':app:checkDebugDuplicateClasses'.
185
+
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
186
+
Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and jetified-kotlin-stdlib-jdk7-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21)
187
+
```
188
+
189
+
**Solution**
190
+
191
+
Add the following dependency constraints to the top of your `app.gradle` above the android section:
This version (1.2.0-alpha05) of the Compose Compiler requires Kotlin version 1.6.10 but you appear to be using Kotlin version 1.7.10 which is not known to be compatible. Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
231
+
```
232
+
233
+
**Solution**
234
+
235
+
Add a `before-plugins.gradle` file next to your app.gradle containing the following:
0 commit comments