Hi, i’ll probably kill myself if i dont solve this problem in the next hour. I cant get this simplest thing DONE.
Whats wrong with facebook sdk and android Build.
PATHETIC
hi, so i keep getting the error when i try to build. When i build using internal i get cant repackage error. and when i use gradle i get this.
"CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_181\bin\java.exe -classpath “C:\Program Files\Unity5.6\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar” org.gradle.launcher.GradleMain “assembleRelease”
stderr[
C:\Users\HP\Documents\unity5Projects\one\Temp\gradleOut\build\intermediates\res\merged\release\values\values.xml:126: AAPT: Error retrieving parent for item: No resource found that matches the given name ‘@style/Theme.AppCompat.NoActionBar’.
C:\Users\HP\Documents\unity5Projects\one\Temp\gradleOut\build\intermediates\res\merged\release\values\values.xml:131: AAPT: Error retrieving parent for item: No resource found that matches the given name ‘@style/Theme.AppCompat.Dialog’.
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:processReleaseResources’.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘C:\Users\HP\AppData\Local\Android\Android-sdk\build-tools\28.0.3\aapt.exe’’ finished with non-zero exit value 1
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
]"
FOR THE LOVE OF GOD PLEASE PLEASE PLEASE HELP ME FIGURE THIS OUT.
Update : i figured it out.
I am using Sdk version 27.0.3
unity is unity5.6
java jdk is 1.8_1
so what was the problem? i spent 12 hours and 4 hours trying to ask mr.google to help me out. The answer was so simple. SO Simple.
just delete unity5Projects\NUP\Assets\FacebookSDK\Plugins\Android
“lib” folder.
so setps:
install sdk 27.0.3 only.
install jdk 1.8
install facebook sdk 7.15.1
delete that pathetic lib file from facebook sdk/plugins/android/
My main error was "
No resource found that matches the given name '@style/Theme.AppCompat.NoActionBar …etc
"
Thats it?? I wasted 16 hours of my life on this. Pathetic from Facebook and unity.
If you do as i answered before you end up with your app crashing everytime on any android device. So this is the updated answer on what i did that saved me from this misery.
install android sdk 27.0.3 – My unity is unity5.6-- java jdk is 1.8_1 (jdk same as everybody)
& facebook sdk 7.15.1.
So the problem is that facebook’s latest sdk doesnt have all the files necessary to complete a successful android build. Some files are missing.
go download facebook sdk 7.9.0. unzip it. open unity . import this 7.9.0 sdk.
deselect everything.
Bottomline: Just select the files that are missing from your main(7.15.1) sdk.
first deselect everything and then…
In facebooksdk–>plugins–> android–>libs. SELECT THE MISSING FILES ONLY. i guess one was vectorsomething, other was appcomsomething, animated-vector-drawsomething
Dont duplicate just see which ones are missing from 7.15.1 and import only those files from 7.9.0 into 7.15.1.
you’ll end up with a total of 19 files(in mycase there are only 19) in your “lib”(i hate this folder so much).
thats it. Youre finally good to go.Finally.