Can't build Unity Project with Facebook SDK, getting a 403 error? - facebook

I've been trying for the last few days to build my project in Unity, but I keep receiving a Gradle error whenever I try. I have added the app ID from FB to the settings and messed around as much as I can, but can't find a solution.
Does anyone know what I could be doing wrong?
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':unityLibrary:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':unityLibrary:releaseCompileClasspath'.
> Could not resolve com.facebook.android:facebook-applinks:[8.0, 9).
Required by:
project :unityLibrary
> Failed to list versions for com.facebook.android:facebook-applinks.
> Unable to load Maven meta-data from https://artifacts.applovin.com/android/com/facebook/android/facebook-applinks/maven-metadata.xml.
> Could not get resource 'https://artifacts.applovin.com/android/com/facebook/android/facebook-applinks/maven-metadata.xml'.
> Could not GET 'https://artifacts.applovin.com/android/com/facebook/android/facebook-applinks/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.facebook.android:facebook-core:[8.0, 9).
Required by:
project :unityLibrary
> Failed to list versions for com.facebook.android:facebook-core.
> Unable to load Maven meta-data from https://artifacts.applovin.com/android/com/facebook/android/facebook-core/maven-metadata.xml.
> Could not get resource 'https://artifacts.applovin.com/android/com/facebook/android/facebook-core/maven-metadata.xml'.
> Could not GET 'https://artifacts.applovin.com/android/com/facebook/android/facebook-core/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.facebook.android:facebook-gamingservices:[8.0, 9).
Required by:
project :unityLibrary
> Failed to list versions for com.facebook.android:facebook-gamingservices.
> Unable to load Maven meta-data from https://artifacts.applovin.com/android/com/facebook/android/facebook-gamingservices/maven-metadata.xml.
> Could not get resource 'https://artifacts.applovin.com/android/com/facebook/android/facebook-gamingservices/maven-metadata.xml'.
> Could not GET 'https://artifacts.applovin.com/android/com/facebook/android/facebook-gamingservices/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.facebook.android:facebook-login:[8.0, 9).
Required by:
project :unityLibrary
> Failed to list versions for com.facebook.android:facebook-login.
> Unable to load Maven meta-data from https://artifacts.applovin.com/android/com/facebook/android/facebook-login/maven-metadata.xml.
> Could not get resource 'https://artifacts.applovin.com/android/com/facebook/android/facebook-login/maven-metadata.xml'.
> Could not GET 'https://artifacts.applovin.com/android/com/facebook/android/facebook-login/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.facebook.android:facebook-share:[8.0, 9).
Required by:
project :unityLibrary
> Failed to list versions for com.facebook.android:facebook-share.
> Unable to load Maven meta-data from https://artifacts.applovin.com/android/com/facebook/android/facebook-share/maven-metadata.xml.
> Could not get resource 'https://artifacts.applovin.com/android/com/facebook/android/facebook-share/maven-metadata.xml'.
> Could not GET 'https://artifacts.applovin.com/android/com/facebook/android/facebook-share/maven-metadata.xml'. Received status code 403 from server: Forbidden
* 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 38s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

I was facing the same issue. It may be related with the jcenter being discontinued. I tried to update the SDK, but it was still showing the same errors.
Update:
I fixed the issue by changing the target API from 33 to 32 and I did this change on my mainTemplate.gradle :
Before
([rootProject] + (rootProject.subprojects as List)).each { project ->
project.repositories {
...
mavenLocal()
mavenCentral()
google()
}
}
After
([rootProject] + (rootProject.subprojects as List)).each { project ->
project.repositories {
...
mavenLocal()
google()
mavenCentral()
}
}
Move the google() up.

Related

Could not resolve com.google.android.gms:play-services-location:16

What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.google.android.gms:play-services-location:16.+.
Required by:
project :app > project :location
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
In case the probelm caused by the location plugin, you can update to latest version of it(4.3.0), that seems to resolve the problem.
If your problem is not solved than, Go to this link that will more helpful for you.

flutter Unable to load Maven meta-data from https://google.bintray.com/exoplayer/androidx/room/room-common/maven-metadata.xml

What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve androidx.room:room-common:[2.2.5].
Required by:
project :app > project :workmanager > androidx.work:work-runtime:2.4.0 > androidx.room:room-runtime:2.2.5
> Failed to list versions for androidx.room:room-common.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/androidx/room/room-common/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/androidx/room/room-common/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/androidx/room/room-common/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
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.
seems to be your project level build.gradle file using this : maven { url 'https://google.bintray.com/exoplayer/' } it should be replaced by maven { url 'https://dl.google.com/dl/android/maven2'}

Updating an old application caused this error => Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'

Installed an app from git-hub to update it, using flutter 1.22.6 (because the app was built using this version) but facing this error when running the code.
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not resolve com.google.firebase:firebase-messaging:[10.2.1, 17.3.99].
Required by:
project :app > com.onesignal:OneSignal:3.15.6
> Failed to list versions for com.google.firebase:firebase-messaging.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/firebase/firebase-messaging/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/firebase/firebase-messaging/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/firebase/firebase-messaging/maven-metadata.xml'. Received status code 403 from server: Forbidden
Could not resolve com.google.android.gms:play-services-ads-identifier:[15.0.0, 16.0.99].
Required by:
project :app > com.onesignal:OneSignal:3.15.6
> Failed to list versions for com.google.android.gms:play-services-ads-identifier.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-ads-identifier/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-ads-identifier/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-ads-identifier/maven-metadata.xml'. Received status code 403 from server: Forbidd
en
Could not resolve com.google.android.gms:play-services-base:[10.2.1, 16.1.99].
Required by:
project :app > com.onesignal:OneSignal:3.15.6
> Failed to list versions for com.google.android.gms:play-services-base.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-base/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-base/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-base/maven-metadata.xml'. Received status code 403 from server: Forbidden
because your project has old dependencies I suggest doing a Flutter clean.
but the error says that you don't have permission to download from the link. I think connect to VPN should solve this issue
For error related to 4XX, replace jcenter() with mavenCentral() in build.gradle file.
repositories {
google()
jcenter() //remove this
mavenCentral() //add this
}

Is a Gradle file affected when you add new files

On Github while working with my friend on some code (actually experimental malware for pentesting), we set up a Gradle check, and it failed. When it ran, it said this:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'wurstplus-two'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT.
Required by:
project :
> Could not resolve net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT.
> Unable to load Maven meta-data from http://repo.spongepowered.org/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml.
> Could not get resource 'http://repo.spongepowered.org/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml'.
> Could not GET 'http://repo.spongepowered.org/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml'. Received status code 520 from server: Origin Error
> Could not resolve org.spongepowered:mixingradle:0.4-SNAPSHOT.
Required by:
project :
> Skipped due to earlier error
* 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 11s
Error: Process completed with exit code 1.
I know we added some files, so I was thinking that might be what happened. I don't know any Gradle, so that's really why I'm asking.
There's actually 2 questions: What does "exit code 1" mean, and was it triggered by those new files being added? The Github repository is here: https://github.com/Scottw1e/wurstplus-two.
try replacing http://repo.spongepowered.org/maven/ with https://repo.spongepowered.org/maven/ in your build.gradle file

cordova build errord gradle

i'm trying to install cordova and open a project on eclipse...this error is coming out when typing cordova build android i setted the proxy gradle.properties under project_folder\prova\platforms\android also under all gradle directory...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:1.0.0+.
Required by:
:android:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://repo1.maven.org/maven2/co
m/android/tools/build/gradle/maven-metadata.xml.
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/bu
ild/gradle/maven-metadata.xml'.
> Connection reset by peer: connect
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 25.641 secs
Built the following apk(s):
proxy settings:
systemProp.http.proxyHost=***
systemProp.http.proxyPort=3128
systemProp.http.proxyUser=***
systemProp.http.proxyPassword=***
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
systemProp.https.proxyHost=***
systemProp.https.proxyPort=***
systemProp.https.proxyUser=***
systemProp.https.proxyPassword=***
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost
i've already read other post so i've already tryied different procedure...