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 - ionic cordova plugin add #38

Closed kaozyc closed 5 years ago

kaozyc commented 5 years ago

I use windows powershell and build android.But it is wrong. How do I do?

PS D:\Projects\MyApp> ionic cordova build android studio Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published. The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. at build_coo6rr94g5y9x4vy26v2tw0nc.run(D:\Projects\MyApp\platforms\android\app\build.gradle:147) (Run with --stacktrace to get the full stack trace of this deprecation warning.) WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

FAILURE: Build failed with an exception.

BUILD FAILED in 1s (node:1332) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:

BUILD FAILED in 1s at ChildProcess.whenDone (D:\Projects\MyApp\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

This is my settings.gradle

include ":" include ":CordovaLib" include ":app" include ':UnityProject' project(':UnityProject').projectDir = new File('D:\Projects\MyApp\platforms\android\ARSystem')

yasirkula commented 5 years ago

I don't remember having an include ":app" in my integrations, but maybe I am misremembering. In this case, you can try making the following change:

include ':app:UnityProject'
project(':app:UnityProject').projectDir = new File('D:\Projects\MyApp\platforms\android\ARSystem')
kaozyc commented 5 years ago

it's working! Thanks!!