Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,52 @@ Thanks to [@PiotrxKolasinski](https://github.com/PiotrxKolasinski) for writing d

## Troubleshooting

**Location:** Unity

**Error:**

```
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)

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.
```

**Solution:**
Locate the listed dll file, in this case:
`Assets/FlutterUnityIntegration/JsonDotNet/Assemblies/AOT/Newtonsoft.Json.dll`

- Option 1:
Delete the dll file or rename the file extension (e.g. `.dll.txt`) to stop it from being imported.
- Option 2:
Uninstall the package that conflicts in the Unity package manager (usually Version control, or Collab).
The exact package can be found by looking for newtonsoft in `package-lock.json`

---


**Location:** Unity

**Error:**

```
The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'JObject' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'JToken' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'JToken' could not be found (are you missing a using directive or an assembly reference?)
```

**Solution:**

Include the Newtonsoft JsonDotNet library.
It is likely already included in your project with a wrong file extension:
`Assets/FlutterUnityIntegration/JsonDotNet/Assemblies/AOT/Newtonsoft.Json.dll.txt`
Rename the `.dll.txt` extension to `.dll` in your file explorer and open Unity again.

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.

---


**Location:** Unity

**Error:**
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

2 changes: 1 addition & 1 deletion example/unity/DemoApp/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"com.unity.collab-proxy": "1.17.1",
"com.unity.collab-proxy": "2.0.3",
"com.unity.ext.nunit": "1.0.6",
"com.unity.ide.rider": "3.0.15",
"com.unity.ide.visualstudio": "2.0.16",
Expand Down
30 changes: 5 additions & 25 deletions example/unity/DemoApp/Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"dependencies": {
"com.unity.collab-proxy": {
"version": "1.17.1",
"version": "2.0.3",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.services.core": "1.0.1"
},
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.editorcoroutines": {
Expand Down Expand Up @@ -48,26 +46,8 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "3.0.2",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.services.core": {
"version": "1.4.2",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.0.2",
"com.unity.modules.androidjni": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.subsystemregistration": {
"version": "1.1.1",
"version": "1.1.0",
"depth": 1,
"source": "registry",
"dependencies": {
Expand Down Expand Up @@ -151,7 +131,7 @@
"url": "https://packages.unity.com"
},
"com.unity.xr.arsubsystems": {
"version": "4.2.3",
"version": "4.2.7",
"depth": 1,
"source": "registry",
"dependencies": {
Expand All @@ -161,7 +141,7 @@
"url": "https://packages.unity.com"
},
"com.unity.xr.legacyinputhelpers": {
"version": "2.1.9",
"version": "2.1.10",
"depth": 1,
"source": "registry",
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions example/unity/DemoApp/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 2022.1.13f1
m_EditorVersionWithRevision: 2022.1.13f1 (22856944e6d2)
m_EditorVersion: 2021.3.22f1
m_EditorVersionWithRevision: 2021.3.22f1 (b6c551784ba3)