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: README.md
+141-138
Original file line number
Diff line number
Diff line change
@@ -380,144 +380,6 @@ Thanks to [@PiotrxKolasinski](https://github.com/PiotrxKolasinski) for writing d
380
380
4. Use the method `SendMessageToFlutter` to send a string. Receive this message using the `onUnityMessage` callback of a `UnityWidget`.
381
381
382
382
383
-
## Troubleshooting
384
-
385
-
**Location:** Unity
386
-
387
-
**Error:**
388
-
389
-
```
390
-
Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included on the current platform. Only one assembly with the same name is allowed per platform. (Assets/FlutterUnityIntegration/JsonDotNet/Assemblies/AOT/Newtonsoft.Json.dll)
391
-
392
-
PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included on the current platform. Only one assembly with the same name is allowed per platform.
Rename the `.dll.txt` extension to `.dll` in your file explorer and open Unity again.
425
-
426
-
Alternatively you can manually add [the library](https://docs.unity3d.com/Packages/com.unity.nuget.newtonsoft-json@3.1/manual/index.html) from the Unity package manager.
427
-
428
-
---
429
-
430
-
431
-
**Location:** Unity
432
-
433
-
**Error:**
434
-
435
-
```
436
-
InvalidOperationException: The build target does not support build appending.
437
-
```
438
-
439
-
**Solution:**
440
-
441
-
1. Open the *unity/__project-name__/Assets/FlutterUnityIntegration/Editor/Build.cs* file.
442
-
443
-
1.1. On line 48, change the following:
444
-
445
-
```diff
446
-
- var options = BuildOptions.AcceptExternalModificationsToPlayer;
- var options = BuildOptions.AcceptExternalModificationsToPlayer;
455
-
+ var options = BuildOptions.AllowDebugging;
456
-
```
457
-
458
-
---
459
-
460
-
**Location:** Android Studio
461
-
462
-
**Error:**
463
-
464
-
```
465
-
minSdkVersion XX cannot be smaller than version 19 declared in library
466
-
\ [:flutter_unity_widget] .../AndroidManifest.xml as the library might be using
467
-
\ APIs not available in XX
468
-
```
469
-
470
-
**Solution:**
471
-
472
-
1. Open the *android/app/build.gradle* file and change the following:
473
-
474
-
```diff
475
-
- minSdkVersion XX
476
-
+ minSdkVersion 19
477
-
```
478
-
479
-
---
480
-
481
-
**Location**: Android Studio
482
-
483
-
**Error:**
484
-
485
-
```
486
-
e: .../FlutterUnityWidgetBuilder.kt: (15, 42): Expecting a parameter declaration
487
-
e: .../FlutterUnityWidgetBuilder.kt: (23, 25): Expecting an argument
488
-
e: .../FlutterUnityWidgetController.kt: (22, 44): Expecting a parameter declaration
489
-
e: .../FlutterUnityWidgetFactory.kt: (13, 58): Expecting a parameter declaration
490
-
```
491
-
492
-
**Solution:**
493
-
494
-
1. Open the *android/build.gradle* file and change the following:
495
-
496
-
```diff
497
-
- ext.kotlin_version = '1.3.50'
498
-
+ ext.kotlin_version = '1.4.31'
499
-
```
500
-
501
-
---
502
-
503
-
**Location:** Android Studio
504
-
505
-
**Error:**
506
-
507
-
```
508
-
Unable to find a matching variant of project :unityLibrary:
509
-
```
510
-
511
-
**Solution:**
512
-
513
-
1. Open the *android/app/build.gradle* file and change the following:
514
-
515
-
```diff
516
-
lintOptions {
517
-
disable 'InvalidPackage'
518
-
+ checkReleaseBuilds false
519
-
}
520
-
```
521
383
522
384
523
385
## Examples
@@ -704,6 +566,147 @@ class _MyAppState extends State<MyApp> {
704
566
-`onUnityUnloaded()` (Unity to flutter listener when unity is unloaded)
705
567
-`onUnitySceneLoaded(String name, int buildIndex, bool isLoaded, bool isValid,)` (Unity to flutter binding and listener when new scene is loaded)
706
568
569
+
## Troubleshooting
570
+
571
+
**Location:** Unity
572
+
573
+
**Error:**
574
+
575
+
```
576
+
Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included on the current platform. Only one assembly with the same name is allowed per platform. (Assets/FlutterUnityIntegration/JsonDotNet/Assemblies/AOT/Newtonsoft.Json.dll)
577
+
578
+
PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included on the current platform. Only one assembly with the same name is allowed per platform.
Rename the `.dll.txt` extension to `.dll` in your file explorer and open Unity again.
611
+
612
+
Alternatively you can manually add [the library](https://docs.unity3d.com/Packages/com.unity.nuget.newtonsoft-json@3.1/manual/index.html) from the Unity package manager.
613
+
614
+
---
615
+
616
+
617
+
**Location:** Unity
618
+
619
+
**Error:**
620
+
621
+
```
622
+
InvalidOperationException: The build target does not support build appending.
623
+
```
624
+
625
+
**Solution:**
626
+
627
+
1. Open the *unity/__project-name__/Assets/FlutterUnityIntegration/Editor/Build.cs* file.
628
+
629
+
1.1. On line 48, change the following:
630
+
631
+
```diff
632
+
- var options = BuildOptions.AcceptExternalModificationsToPlayer;
0 commit comments