yasirkula / UnityIonicIntegration

A guide to integrating Unity 3D content into an Ionic app and sending messages between them (for Android & iOS)(tested with Vuforia plugin)
104 stars 32 forks source link

ERROR: Couldn't find method compile() ... #52

Closed cmaresh closed 5 years ago

cmaresh commented 5 years ago

I am receiving this error when attempting to sync the gradle in Android Studio. I have made the suggested changes to the settings.gradle and android-level build.gradle files, as well as the changes to the AndroidManifest.xml in the Unity Project.

I did not see the applicationID line to be removed from the unity project build.gradle, or the manifests folder in the ionic build.

Full error: ERROR: Could not find method compile() for arguments [project ':UnityProject'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

unityionic

darellbernabe commented 5 years ago

Try moving the compile/implementation line in the build.gradle under app folder. Make sure that you are putting it in the right 'dependecies' code block somewhere in line 200++ image

cmaresh commented 5 years ago

This resolved it, thank you. Readme may need to be changed to show that edit is made to platforms\android\app\build.gradle

yasirkula commented 5 years ago

I had used platforms\android\build.gradle in my tests. Glad the issue is resolved like this, though.

yasirkula commented 5 years ago

Updated the README.