OiO.lk English Android No matching configuration of project :unityLibrary was found
Android

No matching configuration of project :unityLibrary was found


I’m trying to import my Unity project into my Flutter app as a widget. Here are the steps I followed:

  1. Exported Unity Project: I exported the Unity project inside the android folder of my Flutter app.

  2. Included in Android Level build.gradle:

    include ":unityLibrary"
    include ":app"
    
    project(":unityLibrary").projectDir = new File("../unity/unityLibrary")
    
  3. Added Dependency in App Level build.gradle:

    dependencies {
        implementation project(':unityLibrary')
        implementation 'androidx.multidex:multidex:2.0.1'
    }
    

However, I’m encountering the following error while building the app:

Error Message:

  • What went wrong:
    Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.

Could not resolve all task dependencies for configuration ‘:app:debugCompileClasspath’.
Could not resolve project :unityLibrary.
Required by:
project :app
> No matching configuration of project :unityLibrary was found. The consumer was configured to find an API of a component, preferably optimized for Android, as well as attribute ‘com.android.build.api.attributes.BuildTypeAttr’ with value ‘debug’, attribute ‘com.android.build.api.attributes.AgpVersionAttr’ with value ‘7.3.0’, attribute ‘org.jetbrains.kotlin.platform.type’ with value ‘androidJvm’ but:
– None of the consumable configurations have attributes.*

Additional Information:

  • SDK Version: 34
  • Unity Version: 2022.3
  • Gradle Version:1.7.10

Any guidance on resolving this issue would be greatly appreciated!

I already tried

  • Double-checking the paths to ensure they are correct.
  • Cleaning and rebuilding the project.
  • Updating dependencies.
  • added debug build type in unity
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-unity.txt'
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-unity.txt'
        }
    }



You need to sign in to view this answers

Exit mobile version