Open simonechelo-sybo opened 6 months ago
Do you have any updates on this? Are there any workarounds or other SDK versions?
I have the same issue. Any thoughts on this? Any solutions? Here you can download other versions: https://developers.facebook.com/docs/unity/downloads/ I will be trying others to see if any work.
I have the same issue for: ->facebook-unity-sdk-15.1.0 ->facebook-unity-sdk-16.0.0 ->facebook-unity-sdk-16.0.1 ->facebook-unity-sdk-16.0.2
in:
->Unity 2021.2.32f1
->com.google.external-dependency-manager:1.2.177(I can't use the Facebook
Same issue with Unity 2021.3.28f1 and SDK version 14.0.1. Tried Android target API level 30 and 34. Both fail. Android target API level 33 works.
Same issue with Unity 2020.3.48. Changing compileSdkVersion
to 33 (while keeping targetSdkVersion 34) in launcher/build.gradle in the exported gradle project seemed to work. Although there is an error (The compileSdkVersion (33) should not be lower than the targetSdkVersion (34)) shown in Android Studio, but it builds successfully.
Same issue with Unity 2021.3.31f1 and SDK version 16.0.2. Same as PlayaPeter tried Android target API level 34, but build fail. Switch to Android target API level 33 works. I hope to fix the issue of not being able to use Android target API level 34 for building.
Because of this I have to take build in Android studio.
@Ajasmm3plus How did you managed to build with andorid export ? I couldn't make it work.
I have the same issue, It occurs on Facebook SDK latest version 17.0.1
Because of this I have to take build in Android studio.
@Ajasmm3plus Is it possible for you to show complete steps on how you bypass this error by taking build in Android studio?
No one here to resolve the issue on facebook latest SDK 17.0.1, any work around?
What's wrong?
Unity 2021.3 using Build Tools installed with Unity: build-tools v. 30.0.2 To build with FB you need Target API Level 34 AND Build Tools v. 34+
How to solve it
**ADDITIONAL_PROPERTIES**
android.aapt2FromMavenOverride=c:/Users/USER/AppData/Local/Android/Sdk/build-tools/34.0.0/aapt2.exe
What's wrong?
Unity 2021.3 using Build Tools installed with Unity: build-tools v. 30.0.2 To build with FB you need Target API Level 34 AND Build Tools v. 34+
How to solve it
- Install Build Tools v. 34+ using Android Studio
- Open gradleTemplate.properties (from Assets/Plugins/Android)
- Add at the end:
**ADDITIONAL_PROPERTIES** android.aapt2FromMavenOverride=c:/Users/USER/AppData/Local/Android/Sdk/build-tools/34.0.0/aapt2.exe
@s4relok Working great. Thanks. :pray:
What's wrong?
Unity 2021.3 using Build Tools installed with Unity: build-tools v. 30.0.2 To build with FB you need Target API Level 34 AND Build Tools v. 34+
How to solve it
- Install Build Tools v. 34+ using Android Studio
- Open gradleTemplate.properties (from Assets/Plugins/Android)
- Add at the end:
**ADDITIONAL_PROPERTIES** android.aapt2FromMavenOverride=c:/Users/USER/AppData/Local/Android/Sdk/build-tools/34.0.0/aapt2.exe
It's work for unity build But using com.google.android.appbundle, the error is reported again
none of the solutions above work for me, anyone found another solution?
none of the solutions above work for me, anyone found another solution?
I have removed the SDK and now using graph API link (REST Api) for login, it works like a charm and let you get rid of buggy SDK.
上述解决方案对我都不起作用,有人找到了其他解决方案吗?
你要检查你的sdk目录是否下载好,那个34.0.0
Try to raise the Minimum API Level. In my case, it works because I raise it to 24...
In my case: compileSdkVersion = 33 targetSdkVersion = 34
This solve the problem and makes build correctly. Btw cleans the warning in the play console about the sdk version of my app.
Edit: Don't forget to update your Android Studio or just download de newer sdk tools.
I have the same issue with FBSDK 16.0.1 and Unity 2021.3.15. I will try the "android.aapt2FromMavenOverride" fix
Checklist
Environment
2021.3.34f1
16.0.2
Goals / Expected Results
I am trying to build a project for Android, using Target API level 34, that uses FB SDK 16.0.2. It works on Target API level 33, and breaks on 34
Actual Results
Build fails.
Full stacktrace: Editor.log
Steps to Reproduce
Empty project. Set it up. Download FB SDK
16.0.2
from here Install .unitypackage Build for Android.Code Samples & Details
Here's an empty project with just the FB SDK as external package. This builds on Android 33, and not on Android 34 Empty Proj - FB SDK failing.zip