react-native-unity-view icon indicating copy to clipboard operation
react-native-unity-view copied to clipboard

Project with path ':unityLibrary' could not be found in project ':UnityExport'.

Open bobanminic96 opened this issue 4 years ago • 9 comments

Hi everyone,

I've got this error when trying to run-android project.

  • Where: Build file 'C:\xxxx\Project\ProjectName\android\UnityExport\build.gradle' line: 20

  • What went wrong: A problem occurred evaluating project ':UnityExport'.

Project with path ':unityLibrary' could not be found in project ':UnityExport'.

Any ideas?

build.gradle of UnityExport :

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN

allprojects { buildscript { repositories { google() jcenter() }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.0'
        
    }
}

repositories {
    google()
    jcenter()
    flatDir {
        dirs "${project(':unityLibrary').projectDir}/libs"
    }
}

}

task clean(type: Delete) { delete rootProject.buildDir }

I guess this could be related to settings.gradle in export so im providing you that one too.

include ':launcher',':unityLibrary'

bobanminic96 avatar Aug 15 '20 21:08 bobanminic96

I got the same error! Did you fix it?

agh372 avatar Oct 06 '20 21:10 agh372

I do not know if this is correct, but this code fixed the problem and Unity works now inside RN:

afterEvaluate {
       if (project(':UnityExport').tasks.findByName('mergeDebugJniLibFolders'))
           project(':UnityExport').mergeDebugJniLibFolders.dependsOn BuildIl2CppTask
       if (project(':UnityExport').tasks.findByName('mergeReleaseJniLibFolders'))
           project(':UnityExport').mergeReleaseJniLibFolders.dependsOn BuildIl2CppTask
    }

(replace :unityLibrary to :UnityExport)

dmitry-markevich avatar Nov 18 '20 12:11 dmitry-markevich

I do not know if this is correct, but this code fixed the problem and Unity works now inside RN:

afterEvaluate {
       if (project(':UnityExport').tasks.findByName('mergeDebugJniLibFolders'))
           project(':UnityExport').mergeDebugJniLibFolders.dependsOn BuildIl2CppTask
       if (project(':UnityExport').tasks.findByName('mergeReleaseJniLibFolders'))
           project(':UnityExport').mergeReleaseJniLibFolders.dependsOn BuildIl2CppTask
    }

(replace :unityLibrary to :UnityExport)

Where do i need to copy past this code ?

ti-hardikshah avatar Jun 09 '21 12:06 ti-hardikshah

I do not know if this is correct, but this code fixed the problem and Unity works now inside RN:

afterEvaluate {
       if (project(':UnityExport').tasks.findByName('mergeDebugJniLibFolders'))
           project(':UnityExport').mergeDebugJniLibFolders.dependsOn BuildIl2CppTask
       if (project(':UnityExport').tasks.findByName('mergeReleaseJniLibFolders'))
           project(':UnityExport').mergeReleaseJniLibFolders.dependsOn BuildIl2CppTask
    }

(replace :unityLibrary to :UnityExport)

Where do i need to copy past this code ?

In file android/UnityExport/build.gradle

johnsonpeixoto avatar Aug 17 '21 19:08 johnsonpeixoto

Hi everyone,

I've got this error when trying to run-android project.

  • Where: Build file 'C:\xxxx\Project\ProjectName\android\UnityExport\build.gradle' line: 20
  • What went wrong: A problem occurred evaluating project ':UnityExport'.

Project with path ':unityLibrary' could not be found in project ':UnityExport'.

Any ideas?

build.gradle of UnityExport :

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN

allprojects { buildscript { repositories { google() jcenter() }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.0'
        
    }
}

repositories {
    google()
    jcenter()
    flatDir {
        dirs "${project(':unityLibrary').projectDir}/libs"
    }
}

}

task clean(type: Delete) { delete rootProject.buildDir }

I guess this could be related to settings.gradle in export so im providing you that one too.

include ':launcher',':unityLibrary'

did you find any solution on this

komalharmale avatar Sep 21 '21 05:09 komalharmale

A problem occurred evaluating project ':UnityExport'.

Project with path ':unityLibrary' could not be found in project ':UnityExport'.

I am facing the same issue .did anyone have solution on this issue

komalharmale avatar Sep 21 '21 05:09 komalharmale

Hi, When i change :UnityLibrary by :UnityExport i've go this error : > What went wrong: Execution failed for task ':UnityExport:BuildIl2CppTask'.

A problem occurred starting process 'command '/Users/xxxxx/Desktop/xxxx/xxxx-react-native-cli/app/android/UnityExport/src/main/Il2CppOutputProject/IL2CPP/build/deploy/netcoreapp3.1/il2cpp.exe''`

Do you have a solution ?

TeeRa0ne avatar Sep 22 '21 08:09 TeeRa0ne

Hi, When i change :UnityLibrary by :UnityExport i've go this error : > What went wrong: Execution failed for task ':UnityExport:BuildIl2CppTask'.

A problem occurred starting process 'command '/Users/xxxxx/Desktop/xxxx/xxxx-react-native-cli/app/android/UnityExport/src/main/Il2CppOutputProject/IL2CPP/build/deploy/netcoreapp3.1/il2cpp.exe''`

Do you have a solution ?

Hey did you find any solution on this?

komalharmale avatar Sep 23 '21 09:09 komalharmale

Hi everyone,

I've got this error when trying to run-android project.

  • Where: Build file 'C:\xxxx\Project\ProjectName\android\UnityExport\build.gradle' line: 20
  • What went wrong: A problem occurred evaluating project ':UnityExport'.

Project with path ':unityLibrary' could not be found in project ':UnityExport'.

Any ideas?

build.gradle of UnityExport :

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN

allprojects { buildscript { repositories { google() jcenter() }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.0'
        
    }
}

repositories {
    google()
    jcenter()
    flatDir {
        dirs "${project(':unityLibrary').projectDir}/libs"
    }
}

}

task clean(type: Delete) { delete rootProject.buildDir }

I guess this could be related to settings.gradle in export so im providing you that one too.

include ':launcher',':unityLibrary'

Hi, did you find any solution?

ama22ni avatar Sep 29 '22 00:09 ama22ni