Failed to build 18.0.0 in Unity 6 with GameActivity option.
Checklist
- [ x] I've updated to the latest released version of the SDK
- [ x] I've searched for existing GitHub issues
- [x ] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [ ] I've read the Code of Conduct
- [ x] This issue is not security related and can safely be disclosed publicly on GitHub
Environment
Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:
- Unity Editor Version:
6000.0.48f1with Application entry point is GameActivity. - Unity SDK Version:
18.0.0 - Installation Platform & Verison:
[Android]
Goals
After upgrade to facebook 18.0.0 I want to build success with GameActivity entry point.
Expected Results
Build success without any error.
Actual Results
Build failed.
Steps to Reproduce
Switch to GameActivity and make a build.
Code Samples & Details
Note: Error log below
CommandInvokationFailure: Gradle build failed.
/Applications/Unity/Hub/Editor/6000.0.48f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/6000.0.48f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-8.11.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
Environment Variables:
XPC_SERVICE_NAME = application.com.unity3d.unityhub.107707942.107707953
XPC_FLAGS = 0x0
MallocNanoZone = 0
LaunchInstanceID = 57764C7C-836C-4D87-B851-3AFBFC855A4D
SECURITYSESSIONID = 186a3
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
SHELL = /bin/zsh
SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.4bdkffiQjZ/Listeners
HOME = /Users/longchau
PATH = /usr/bin:/bin:/usr/sbin:/sbin
__CFBundleIdentifier = com.unity3d.unityhub
USER = longchau
__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0
TMPDIR = /var/folders/lt/d0khm0vn7czdl3b5knn5sp0r0000gn/T/
LOGNAME = longchau
JAVA_HOME = /Applications/Unity/Hub/Editor/6000.0.48f1/PlaybackEngines/AndroidPlayer/OpenJDK
ANDROID_NDK_ROOT = /Applications/Unity/Hub/Editor/6000.0.48f1/PlaybackEngines/AndroidPlayer/NDK
COMMAND_MODE = unix2003
stderr[
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':launcher:checkReleaseAarMetadata'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
> Could not resolve com.facebook.android:facebook-applinks:[18.0.0,19).
Required by:
project :launcher > project :unityLibrary
> Failed to list versions for com.facebook.android:facebook-applinks.
> Unable to load Maven meta-data from https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea/com/facebook/android/facebook-applinks/maven-metadata.xml.
> Could not GET 'https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea/com/facebook/android/facebook-applinks/maven-metadata.xml'.
> Connect to dl-maven-android.mintegral.com:443 [dl-maven-android.mintegral.com/0.0.0.0, dl-maven-android.mintegral.com/0:0:0:0:0:0:0:0] failed: Connect timed out
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':unityLibrary:configureCMakeRelWithDebInfo[arm64-v8a]'.
> Could not resolve all files for configuration ':unityLibrary:releaseCompileClasspath'.
> Could not resolve com.google.firebase:firebase-analytics-unity:12.2.1.
Required by:
project :unityLibrary
> Repository maven6 is disabled due to earlier error below:
> Failed to list versions for com.facebook.android:facebook-applinks.
> Unable to load Maven meta-data from https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea/com/facebook/android/facebook-applinks/maven-metadata.xml.
> Could not GET 'https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea/com/facebook/android/facebook-applinks/maven-metadata.xml'.
> Connect to dl-maven-android.mintegral.com:443 [dl-maven-android.mintegral.com/0.0.0.0, dl-maven-android.mintegral.com/0:0:0:0:0:0:0:0] failed: Connect timed out
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================
BUILD FAILED in 6m 23s
]
stdout[
Starting a Gradle Daemon (subsequent builds will be faster)
> Configure project :unityLibrary
Variant 'debug', will keep symbols in binaries for:
'libunity.so'
'libil2cpp.so'
'libmain.so'
Variant 'release', symbols will be stripped from binaries.
> Configure project :launcher
Variant 'debug', will keep symbols in binaries for:
'libunity.so'
'libil2cpp.so'
'libmain.so'
Variant 'release', symbols will be stripped from binaries.
> Configure project :unityLibrary:FirebaseApp.androidlib
WARNING: minSdkVersion (24) is greater than targetSdkVersion (9) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING: minSdkVersion (24) is greater than targetSdkVersion (9) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
> Configure project :unityLibrary:FirebaseCrashlytics.androidlib
WARNING: minSdkVersion (24) is greater than targetSdkVersion (9) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING: minSdkVersion (24) is greater than targetSdkVersion (9) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
> Configure project :unityLibrary:GooglePlayGamesManifest.androidlib
WARNING: minSdkVersion (24) is greater than targetSdkVersion (16) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING: minSdkVersion (24) is greater than targetSdkVersion (16) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
> Configure project :unityLibrary:IronSource.androidlib
WARNING: minSdkVersion (24) is greater than targetSdkVersion (9) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
WARNING: minSdkVersion (24) is greater than targetSdkVersion (9) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:FirebaseApp.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:IronSource.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:FirebaseCrashlytics.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:mobilenotifications.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:FirebaseApp.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:IronSource.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:FirebaseCrashlytics.androidlib:preReleaseBuild UP-TO-DATE
> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :launcher:javaPreCompileRelease
> Task :unityLibrary:mobilenotifications.androidlib:writeReleaseAarMetadata
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:writeReleaseAarMetadata
> Task :unityLibrary:FirebaseApp.androidlib:writeReleaseAarMetadata
> Task :unityLibrary:writeReleaseAarMetadata
> Task :unityLibrary:IronSource.androidlib:writeReleaseAarMetadata
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:writeReleaseAarMetadata
> Task :unityLibrary:FirebaseCrashlytics.androidlib:writeReleaseAarMetadata
> Task :unityLibrary:FirebaseCrashlytics.androidlib:generateReleaseResValues
> Task :unityLibrary:generateReleaseResValues
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues
> Task :unityLibrary:IronSource.androidlib:generateReleaseResValues
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseResValues
> Task :launcher:generateReleaseResValues
> Task :unityLibrary:FirebaseApp.androidlib:generateReleaseResValues
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:generateReleaseResValues
> Task :unityLibrary:FirebaseApp.androidlib:generateReleaseResources
> Task :unityLibrary:IronSource.androidlib:generateReleaseResources
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseResources
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:generateReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources
> Task :unityLibrary:FirebaseCrashlytics.androidlib:generateReleaseResources
> Task :unityLibrary:generateReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources
> Task :unityLibrary:mobilenotifications.androidlib:packageReleaseResources
> Task :unityLibrary:IronSource.androidlib:packageReleaseResources
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:packageReleaseResources
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:extractDeepLinksRelease
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease
> Task :unityLibrary:mobilenotifications.androidlib:extractDeepLinksRelease
> Task :unityLibrary:IronSource.androidlib:extractDeepLinksRelease
> Task :unityLibrary:FirebaseCrashlytics.androidlib:packageReleaseResources
> Task :unityLibrary:FirebaseApp.androidlib:packageReleaseResources
> Task :unityLibrary:FirebaseApp.androidlib:extractDeepLinksRelease
> Task :unityLibrary:FirebaseCrashlytics.androidlib:extractDeepLinksRelease
> Task :unityLibrary:packageReleaseResources
> Task :unityLibrary:extractDeepLinksRelease
> Task :unityLibrary:mobilenotifications.androidlib:processReleaseManifest
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest
package="com.google.unity.ads" found in source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/GoogleMobileAdsPlugin.androidlib/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.google.unity.ads" from the source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/GoogleMobileAdsPlugin.androidlib/AndroidManifest.xml.
/Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/GoogleMobileAdsPlugin.androidlib/AndroidManifest.xml:3:3-42 Warning:
uses-sdk:minSdkVersion value (21) specified in the manifest file is ignored. It is overridden by the value declared in the DSL or the variant API, or 1 if not declared/present. Current value is (24).
> Task :unityLibrary:FirebaseApp.androidlib:processReleaseManifest
package="com.google.firebase.app.unity" found in source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/FirebaseApp.androidlib/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.google.firebase.app.unity" from the source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/FirebaseApp.androidlib/AndroidManifest.xml.
> Task :unityLibrary:FirebaseCrashlytics.androidlib:processReleaseManifest
package="com.google.firebase.crashlytics.unity" found in source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/FirebaseCrashlytics.androidlib/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.google.firebase.crashlytics.unity" from the source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/FirebaseCrashlytics.androidlib/AndroidManifest.xml.
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:processReleaseManifest
package="com.google.example.games.mainlibproj" found in source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/GooglePlayGamesManifest.androidlib/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.google.example.games.mainlibproj" from the source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/GooglePlayGamesManifest.androidlib/AndroidManifest.xml.
> Task :unityLibrary:IronSource.androidlib:processReleaseManifest
package="com.ironsource.unity" found in source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/IronSource.androidlib/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="com.ironsource.unity" from the source AndroidManifest.xml: /Users/longchau/Workspace/dw-upgrade/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/IronSource.androidlib/AndroidManifest.xml.
> Task :unityLibrary:processReleaseManifest
> Task :unityLibrary:compileReleaseLibraryResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources
> Task :unityLibrary:FirebaseApp.androidlib:compileReleaseLibraryResources
> Task :unityLibrary:FirebaseCrashlytics.androidlib:compileReleaseLibraryResources
> Task :unityLibrary:IronSource.androidlib:compileReleaseLibraryResources
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:compileReleaseLibraryResources
> Task :unityLibrary:mobilenotifications.androidlib:compileReleaseLibraryResources
> Task :unityLibrary:IronSource.androidlib:parseReleaseLocalResources
> Task :unityLibrary:mobilenotifications.androidlib:parseReleaseLocalResources
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:parseReleaseLocalResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources
> Task :unityLibrary:FirebaseCrashlytics.androidlib:parseReleaseLocalResources
> Task :unityLibrary:FirebaseApp.androidlib:parseReleaseLocalResources
> Task :unityLibrary:parseReleaseLocalResources
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:generateReleaseRFile
> Task :unityLibrary:FirebaseApp.androidlib:generateReleaseRFile
> Task :unityLibrary:generateReleaseRFile
> Task :unityLibrary:mobilenotifications.androidlib:generateReleaseRFile
> Task :unityLibrary:IronSource.androidlib:generateReleaseRFile
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile
> Task :unityLibrary:FirebaseCrashlytics.androidlib:generateReleaseRFile
> Task :unityLibrary:FirebaseApp.androidlib:javaPreCompileRelease
> Task :unityLibrary:FirebaseCrashlytics.androidlib:javaPreCompileRelease
> Task :unityLibrary:IronSource.androidlib:javaPreCompileRelease
> Task :unityLibrary:mobilenotifications.androidlib:javaPreCompileRelease
> Task :unityLibrary:javaPreCompileRelease
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:javaPreCompileRelease
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease
> Task :unityLibrary:FirebaseCrashlytics.androidlib:compileReleaseJavaWithJavac NO-SOURCE
> Task :unityLibrary:IronSource.androidlib:compileReleaseJavaWithJavac NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac NO-SOURCE
> Task :unityLibrary:GooglePlayGamesManifest.androidlib:compileReleaseJavaWithJavac NO-SOURCE
> Task :unityLibrary:FirebaseApp.androidlib:compileReleaseJavaWithJavac NO-SOURCE
> Task :unityLibrary:processReleaseJavaRes
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibCompileToJarRelease
> Task :unityLibrary:IronSource.androidlib:bundleLibCompileToJarRelease
> Task :unityLibrary:FirebaseApp.androidlib:bundleLibCompileToJarRelease
> Task :unityLibrary:extractProguardFiles
> Task :unityLibrary:GooglePlayGa<message truncated>
Note: I build it with Activity successfully. But not with GameActivity.
Note: I build it with Activity successfully. But not with GameActivity.
hello, i'm trying to build facebook sdk on unity 6 also but it fails, can you tell me how to build it with activity ?? or any work around that could fix it?
thank you very much .
hello, i'm trying to build facebook sdk on unity 6 also but it fails, can you tell me how to build it with activity ?? or any work around that could fix it?
Well. Under Player Setting you can see the Application Entry Point, it allows you to choose between Activity or GameActivity. Not sure whether your project has default setting choosing Activity or not, but worth to check that.