Skip to content

error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?) #581

Closed
@rmib200

Description

@rmib200

Describe the bug
After importing the unitypackage a "Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included or the current platform. Only one assembly with the same name is allowed per platform." error appeared. I deleted the JsonDotNet folder and event tried to impot the unitypackage without the folder but the same errors appears:

Assets\FlutterUnityIntegration\NativeAPI.cs(29,13): error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(29,39): error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(32,16): error CS0246: The type or namespace name 'Exception' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(34,13): error CS0103: The name 'Debug' does not exist in the current context

Assets\FlutterUnityIntegration\NativeAPI.cs(48,13): error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(48,39): error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(51,16): error CS0246: The type or namespace name 'Exception' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(53,13): error CS0103: The name 'Debug' does not exist in the current context

Assets\FlutterUnityIntegration\NativeAPI.cs(67,26): error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(68,49): error CS0246: The type or namespace name 'AndroidJavaObject' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(71,16): error CS0246: The type or namespace name 'Exception' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(73,13): error CS0103: The name 'Debug' does not exist in the current context

Assets\FlutterUnityIntegration\NativeAPI.cs(85,13): error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(85,39): error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(86,13): error CS0246: The type or namespace name 'AndroidJavaObject' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(86,63): error CS0246: The type or namespace name 'AndroidJavaObject' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(89,16): error CS0246: The type or namespace name 'Exception' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(91,13): error CS0103: The name 'Debug' does not exist in the current context

Assets\FlutterUnityIntegration\NativeAPI.cs(103,13): error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(103,39): error CS0246: The type or namespace name 'AndroidJavaClass' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(104,13): error CS0246: The type or namespace name 'AndroidJavaObject' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(104,63): error CS0246: The type or namespace name 'AndroidJavaObject' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(107,16): error CS0246: The type or namespace name 'Exception' could not be found (are you missing a using directive or an assembly reference?)

Assets\FlutterUnityIntegration\NativeAPI.cs(109,13): error CS0103: The name 'Debug' does not exist in the current context

To Reproduce
Steps to reproduce the behavior:

  1. Import Package as directed in readme
  2. Delete JsonDotNet folder
  3. New errors appeared

Expected behavior
A "Flutter" option should appear in the navbar.

Screenshots
If applicable, add screenshots to help explain your problem.

Unity (please complete the following information):

  • OS: Windows 10
  • Version 2020.3.28f1

Smartphone (please complete the following information):

  • OS: Android

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions