Getting an error when building and apk with google cardboard

Hello there, I´m running to an error while the build of my project, its just simple project that has a sound and when you and not near it, it fades. I integrated the google cardboard api in the project, and just a simple audio object in the scene. After some time making Unity find the JDK when creating the apk it shows me this error.

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Users\Darkaos\AppData\Local\Android\android-sdk\build-tools\24.0.0-preview\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/Darkaos/AppData/Local/Android/android-sdk/platforms/android-23\android.jar" -F bin/resources.ap_

stderr[

]
stdout[

]

I have no idea what this error mean and I don´t know what to do, I have installed the SDK of android, here is a image of everything I have install.


Also I have Java JDK 1.8.0_73. Running windows 10 with unity 4.7.

I hope you guys can help me. Thanks

Found the solution somewhere else… as under

  1. Update to latest available jdk.
  2. Update the environment variables on windows
    (eg. New JAVA_HOME value C:\Program Files\Java\jdk1.8.0_101)
  3. Change external tool path in unity
    (eg. C:\Program Files\Java\jdk1.8.0_101)