Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bobanminic96 opened this issue Aug 15, 2020 · 9 comments

Comments

@bobanminic96
Copy link

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'

@agh372
Copy link

agh372 commented Oct 6, 2020

I got the same error! Did you fix it?

@dmitry-markevich
Copy link

dmitry-markevich commented Nov 18, 2020

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)

@ti-hardikshah
Copy link

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 ?

@johnsonpeixoto
Copy link

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

@komalharmale
Copy link

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
Copy link

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

@TeeRa0ne
Copy link

TeeRa0ne commented Sep 22, 2021

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 ?

@komalharmale
Copy link

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?

@twentectf
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants