无法解析 com.google.firebase:firebase-messaging:[10.2.1, 12.1.0)
Could not resolve com.google.firebase:firebase-messaging:[10.2.1, 12.1.0)
我想分享一个成为我噩梦的问题:
ERROR: Unable to resolve dependency for ':OnlineHeadBall2@debug/compileClasspath': Could not resolve com.google.firebase:firebase-messaging:[10.2.1, 12.1.0).
当我尝试构建我的项目时,控制台出现错误:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':appName:transformClassesAndResourcesWithR8ForRelease'.
> Could not resolve all task dependencies for configuration ':appName:releaseCompileClasspath'.
> Could not resolve com.google.firebase:firebase-messaging:[10.2.1, 12.1.0).
Required by:
project :appName > com.onesignal:OneSignal:3.10.9
> Failed to list versions for com.google.firebase:firebase-messaging.
> Could not list versions using M2 pattern 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/firebase/firebase-messaging/'.
> Could not GET 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/firebase/firebase-messaging/'. Received status code 400 from server: Bad Request
> Failed to list versions for com.google.firebase:firebase-messaging.
> Unable to load Maven meta-data from https://s3.amazonaws.com/moat-sdk-builds/com/google/firebase/firebase-messaging/maven-metadata.xml.
> Could not get resource 'https://s3.amazonaws.com/moat-sdk-builds/com/google/firebase/firebase-messaging/maven-metadata.xml'.
> Could not GET 'https://s3.amazonaws.com/moat-sdk-builds/com/google/firebase/firebase-messaging/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.google.android.gms:play-services-location:[10.2.1, 12.1.0).
Required by:
project :appName > com.onesignal:OneSignal:3.10.9
> Failed to list versions for com.google.android.gms:play-services-location.
> Could not list versions using M2 pattern 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/android/gms/play-services-location/'.
> Could not GET 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/android/gms/play-services-location/'. Received status code 400 from server: Bad Request
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not get resource 'https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Could not GET 'https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.google.android.gms:play-services-base:[10.2.1, 12.1.0).
Required by:
project :appName > com.onesignal:OneSignal:3.10.9
> Failed to list versions for com.google.android.gms:play-services-base.
> Could not list versions using M2 pattern 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/android/gms/play-services-base/'.
> Could not GET 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/android/gms/play-services-base/'. Received status code 400 from server: Bad Request
> Failed to list versions for com.google.android.gms:play-services-base.
> Unable to load Maven meta-data from https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-base/maven-metadata.xml.
> Could not get resource 'https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-base/maven-metadata.xml'.
> Could not GET 'https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-base/maven-metadata.xml'. Received status code 403 from server: Forbidden
* Try:
Run with --stacktrace option to get the stack trace. Run with --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 23s
Error running command, return code: 1.
我觉得这里可疑的是OneSignal。因此,我将 the workaround in here 应用于 OneSignal,但我最近构建的 apk 在启动时崩溃了。所以解决方法对我不起作用。
我的一般 gradle 文件如下:
buildscript {
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.31.2'
}
}
allprojects {
repositories {
google()
mavenLocal()
mavenCentral()
jcenter()
}
}
这是我的应用 gradle 文件:
/** GENERATE CMAKEFILES.TXT FOR GAME CLASSES **/
file("../../Classes/cmake/CMakeLists.txt").withWriter("utf-8") { writer ->
writer.writeLine("\n# APP NAME AUTOGENERATED CMAKELISTS FILE, DO NOT DELETE #\n")
writer.writeLine("set(GAME_SOURCE")
project.fileTree("../../Classes").matching {
include "**/**.cpp"
include "**/**.c"
}.sort().forEach { file ->
writer.writeLine("\t${file.path}")
}
writer.writeLine(")\n\n")
writer.write("set(GAME_HEADER\n")
project.fileTree("../../Classes").matching {
include "**/**.hpp"
include "**/**.h"
}.sort().forEach { file ->
writer.writeLine("\t${file.path}")
}
writer.writeLine(")\n\n")
}
/*********************************************/
buildscript {
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
maven { url 'https://plugins.gradle.org/m2/'}//onesignal
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
//noinspection GradleDynamicVersion
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.company.appName"
minSdkVersion 15
targetSdkVersion 28
versionCode 111908
versionName "1.119"
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "*****************************",
onesignal_google_project_number: "REMOTE"]
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
externalNativeBuild {
if(PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
targets 'appName'
def module_paths = [project.file("../../cocos2d").absolutePath,
project.file("../../cocos2d/cocos").absolutePath,
project.file("../../cocos2d/external").absolutePath]
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments 'APP_PLATFORM=android-' + PROP_TARGET_SDK_VERSION
arguments '-j' + Runtime.runtime.availableProcessors()
if (OperatingSystem.current().isWindows()) {
module_paths = module_paths.collect {it.replaceAll('\\', '/')}
arguments 'NDK_MODULE_PATH=' + module_paths.join(";")
} else {
arguments 'NDK_MODULE_PATH=' + module_paths.join(':')
}
}
} else if(PROP_BUILD_TYPE == 'cmake') {
cmake {
targets 'appName'
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE"
cppFlags "-frtti -fexceptions -fsigned-char"
}
}
}
}
dexOptions {
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
sourceSets.main {
java.srcDir "src"
res.srcDir "res"
jniLibs.srcDirs = ['jniLibs']
jni.srcDirs = []
manifest.srcFile "AndroidManifest.xml"
assets.srcDir "../../Resources"
}
externalNativeBuild {
if(PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
path "jni/Android.mk"
}
} else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}
}
}
signingConfigs {
release {
def userHomePath = System.properties['user.home']
def propertyFile = new File(userHomePath, ".gradle/gradle.properties") // Can be signing.properties as well
if (propertyFile.canRead()){
Properties props = new Properties()
props.load(new FileInputStream(propertyFile))
// Loading credentials from props
storeFile file(props['RELEASE_STORE_FILE'])
storePassword props['RELEASE_STORE_PASSWORD']
keyAlias props['RELEASE_KEY_ALIAS']
keyPassword props['RELEASE_KEY_PASSWORD']
}
}
}
useLibrary 'org.apache.http.legacy'
buildTypes {
release {
ext.alwaysUpdateBuildId = true
zipAlignEnabled false
debuggable false
jniDebuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=0'
}
}
}
debug {
ext.alwaysUpdateBuildId = false // prevent fabric.io to generate id
debuggable true
jniDebuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=1'
}
}
}
}
/*
// This is required for the gradle automation.
// Source https://medium.com/mindorks/how-did-i-automate-the-generation-of-release-apk-3e42b6540a4a
TLDR;
Also notice that I have added lintOptions which ignores errors at build time. This is needed for our automate script to work.
If lintOptions are not disabled, it gives the error belov
▸ org.xmlpull.v1.XmlPullParserException: expected: /meta read: HEAD (position:END_TAG </HEAD>@2:32 in java.io.InputStreamReader@4b80c948)
*/
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
repositories {
google()
jcenter()
mavenCentral()
flatDir {
dirs 'libs'
}
maven { url 'https://maven.google.com' }
maven { url 'https://maven.fabric.io/public' }
maven { url 'http://repo.admost.com:8081/artifactory/admost' }
//maven { url 'http://repo.admost.com:8081/artifactory/test-before-publish' }
maven { url 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master' }
maven { url 'https://vungle.bintray.com/vungle-android-beta' }
maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
maven { url "http://dl.appnext.com/" }
maven { url 'https://jitpack.io' }
maven { url 'https://dl.bintray.com/pubnative/maven' }
}
crashlytics {
enableNdk true
}
rootProject.allprojects.each(){
it.repositories {
flatDir dirs: (projectDir.absolutePath+'/libs')
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':libcocos2dx')
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.core:core:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-plus:17.0.0'
implementation 'com.google.android.gms:play-services-games:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.android.gms:play-services-basement:17.1.1'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.3'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
//'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
implementation 'com.google.firebase:firebase-ads:19.0.0'
implementation 'com.google.firebase:firebase-config:19.1.1'
implementation 'com.adjust.sdk:adjust-android:4.16.0'
//noinspection GradleDynamicVersion
implementation 'com.facebook.android:facebook-android-sdk:5.+'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.onesignal:OneSignal:3.11.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.exoplayer:exoplayer:2.8.3'
implementation 'com.android.volley:volley:1.1.0'
implementation 'io.branch.sdk.android:library:2.19.5'
// AMR
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.admost.sdk:amr:2.0.7'
implementation 'com.admost.sdk:admost:0.0.6.a16'
implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation 'com.google.android.gms:play-services-ads:17.2.1'
implementation 'com.admost.sdk:admob-gt-17.2.0-adapter:1.0.2.a16'
implementation 'com.admost.sdk:adcolony:4.1.2.a16'
implementation 'com.admost.sdk:chartboost:7.5.0.a16'
implementation 'com.admost.sdk:facebook:5.6.1.a16'
implementation 'com.admost.sdk:hyprmx-adapter:5.0.1.a16'
implementation 'com.hyprmx.android:HyprMX-SDK:5.0.1'
implementation 'com.admost.sdk:ironsource:6.13.0.1.a16'
implementation 'com.admost.sdk:mintegral:10.2.1.a16'
implementation 'com.admost.sdk:ogury:4.3.7.a16'
implementation 'net.pubnative:hybid.sdk:0.7.1'
implementation 'com.admost.sdk:pubnative-adapter:0.7.1.a16'
implementation 'com.admost.sdk:qumpara:0.3.3.a16'
implementation 'com.admost.sdk:tapjoy:12.4.2.a16'
implementation 'com.admost.sdk:unity:3.4.0.a16'
implementation 'com.vungle:publisher-sdk-android:6.5.1'
implementation 'com.admost.sdk:vungle-adapter:6.5.1.a16'
implementation name: 'mcprime', ext: 'aar'
implementation name: 'mcgoliath', ext: 'aar'
implementation (name:'ADTUnityAdsAdapter3.0.1',ext:'aar')
}
apply plugin: 'com.google.gms.google-services'
Gradle 包装属性文件:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
你有解决这个问题的想法吗?请帮我。谢谢你的时间。
我的队友 Erman 解决了这个问题。我想与您分享解决方案。我将分享可以成功构建应用程序的 gradle 文件。你应该分析一下新旧的区别。
主要gradle
buildscript {
repositories {
google()
mavenLocal()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.31.2'
}
}
**app module gradle**
/** GENERATE CMAKEFILES.TXT FOR GAME CLASSES **/
file("../../Classes/cmake/CMakeLists.txt").withWriter("utf-8") { writer ->
writer.writeLine("\n# APP NAME AUTOGENERATED CMAKELISTS FILE, DO NOT DELETE #\n")
writer.writeLine("set(GAME_SOURCE")
project.fileTree("../../Classes").matching {
include "**/**.cpp"
include "**/**.c"
}.sort().forEach { file ->
writer.writeLine("\t${file.path}")
}
writer.writeLine(")\n\n")
writer.write("set(GAME_HEADER\n")
project.fileTree("../../Classes").matching {
include "**/**.hpp"
include "**/**.h"
}.sort().forEach { file ->
writer.writeLine("\t${file.path}")
}
writer.writeLine(")\n\n")
}
/*********************************************/
allprojects {
repositories {
google()
mavenLocal()
jcenter()
}
}
buildscript {
repositories {
google()
mavenLocal()
jcenter()
maven { url 'https://plugins.gradle.org/m2/'}//onesignal
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
//noinspection GradleDynamicVersion
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.company.appName"
minSdkVersion 16
targetSdkVersion 29
versionCode 111908
versionName "1.119"
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "*************************",
onesignal_google_project_number: "REMOTE"]
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
externalNativeBuild {
if(PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
targets 'appName'
def module_paths = [project.file("../../cocos2d").absolutePath,
project.file("../../cocos2d/cocos").absolutePath,
project.file("../../cocos2d/external").absolutePath]
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments 'APP_PLATFORM=android-' + PROP_TARGET_SDK_VERSION
arguments '-j' + Runtime.runtime.availableProcessors()
if (OperatingSystem.current().isWindows()) {
module_paths = module_paths.collect {it.replaceAll('\\', '/')}
arguments 'NDK_MODULE_PATH=' + module_paths.join(";")
} else {
arguments 'NDK_MODULE_PATH=' + module_paths.join(':')
}
}
} else if(PROP_BUILD_TYPE == 'cmake') {
cmake {
targets 'appName'
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE"
cppFlags "-frtti -fexceptions -fsigned-char"
}
}
}
}
dexOptions {
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
sourceSets.main {
java.srcDir "src"
res.srcDir "res"
jniLibs.srcDirs = ['jniLibs']
jni.srcDirs = []
manifest.srcFile "AndroidManifest.xml"
assets.srcDir "../../Resources"
}
externalNativeBuild {
if(PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
path "jni/Android.mk"
}
} else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}
}
}
signingConfigs {
release {
def userHomePath = System.properties['user.home']
def propertyFile = new File(userHomePath, ".gradle/gradle.properties") // Can be signing.properties as well
if (propertyFile.canRead()){
Properties props = new Properties()
props.load(new FileInputStream(propertyFile))
// Loading credentials from props
storeFile file(props['RELEASE_STORE_FILE'])
storePassword props['RELEASE_STORE_PASSWORD']
keyAlias props['RELEASE_KEY_ALIAS']
keyPassword props['RELEASE_KEY_PASSWORD']
}
}
}
useLibrary 'org.apache.http.legacy'
buildTypes {
release {
ext.alwaysUpdateBuildId = true
zipAlignEnabled false
debuggable false
jniDebuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=0'
}
}
}
debug {
ext.alwaysUpdateBuildId = false // prevent fabric.io to generate id
debuggable true
jniDebuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=1'
}
}
}
}
/*
// This is required for the gradle automation.
// Source https://medium.com/mindorks/how-did-i-automate-the-generation-of-release-apk-3e42b6540a4a
TLDR;
Also notice that I have added lintOptions which ignores errors at build time. This is needed for our automate script to work.
If lintOptions are not disabled, it gives the error belov
▸ org.xmlpull.v1.XmlPullParserException: expected: /meta read: HEAD (position:END_TAG </HEAD>@2:32 in java.io.InputStreamReader@4b80c948)
*/
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
repositories {
google()
mavenLocal()
jcenter()
flatDir {
dirs 'libs'
}
maven { url 'https://maven.fabric.io/public' }
maven { url 'http://repo.admost.com:8081/artifactory/admost' }
//maven { url 'http://repo.admost.com:8081/artifactory/test-before-publish' }
//maven { url 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master' }
maven { url 'https://vungle.bintray.com/vungle-android-beta' }
//maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
maven { url "http://dl.appnext.com/" }
maven { url 'https://jitpack.io' }
maven { url 'https://dl.bintray.com/pubnative/maven' }
}
crashlytics {
enableNdk true
}
rootProject.allprojects.each(){
it.repositories {
flatDir dirs: (projectDir.absolutePath+'/libs')
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':libcocos2dx')
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.core:core:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-plus:17.0.0'
implementation 'com.google.android.gms:play-services-games:19.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.android.gms:play-services-basement:17.1.1'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation 'com.google.android.gms:play-services-ads:19.0.0'
implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.3'
implementation 'com.google.firebase:firebase-messaging:20.1.3'
//'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
implementation 'com.google.firebase:firebase-ads:19.0.0'
implementation 'com.google.firebase:firebase-config:19.1.3'
implementation 'com.adjust.sdk:adjust-android:4.16.0'
//noinspection GradleDynamicVersion
implementation 'com.facebook.android:facebook-android-sdk:5.+'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.exoplayer:exoplayer:2.8.3'
implementation 'com.android.volley:volley:1.1.0'
implementation 'io.branch.sdk.android:library:2.19.5'
// AMR
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.admost.sdk:amr:2.0.7'
implementation 'com.admost.sdk:admost:0.0.6.a16'
implementation 'com.admost.sdk:admob-gt-17.2.0-adapter:1.0.2.a16'
implementation 'com.admost.sdk:adcolony:4.1.2.a16'
implementation 'com.admost.sdk:chartboost:7.5.0.a16'
implementation 'com.admost.sdk:facebook:5.6.1.a16'
//implementation 'com.admost.sdk:hyprmx-adapter:5.0.1.a16'
//implementation 'com.hyprmx.android:HyprMX-SDK:5.0.1'
implementation 'com.admost.sdk:ironsource:6.13.0.1.a16'
implementation 'com.admost.sdk:mintegral:10.2.1.a16'
implementation 'com.admost.sdk:ogury:4.3.7.a16'
implementation 'net.pubnative:hybid.sdk:0.7.1'
implementation 'com.admost.sdk:pubnative-adapter:0.7.1.a16'
implementation 'com.admost.sdk:qumpara:0.3.3.a16'
implementation 'com.admost.sdk:tapjoy:12.4.2.a16'
implementation 'com.admost.sdk:unity:3.4.0.a16'
implementation 'com.vungle:publisher-sdk-android:6.5.1'
implementation 'com.admost.sdk:vungle-adapter:6.5.1.a16'
implementation name: 'mcprime', ext: 'aar'
implementation name: 'mcgoliath', ext: 'aar'
implementation (name:'ADTUnityAdsAdapter3.0.1',ext:'aar')
}
apply plugin: 'com.google.gms.google-services'
我想分享一个成为我噩梦的问题:
ERROR: Unable to resolve dependency for ':OnlineHeadBall2@debug/compileClasspath': Could not resolve com.google.firebase:firebase-messaging:[10.2.1, 12.1.0).
当我尝试构建我的项目时,控制台出现错误:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':appName:transformClassesAndResourcesWithR8ForRelease'.
> Could not resolve all task dependencies for configuration ':appName:releaseCompileClasspath'.
> Could not resolve com.google.firebase:firebase-messaging:[10.2.1, 12.1.0).
Required by:
project :appName > com.onesignal:OneSignal:3.10.9
> Failed to list versions for com.google.firebase:firebase-messaging.
> Could not list versions using M2 pattern 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/firebase/firebase-messaging/'.
> Could not GET 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/firebase/firebase-messaging/'. Received status code 400 from server: Bad Request
> Failed to list versions for com.google.firebase:firebase-messaging.
> Unable to load Maven meta-data from https://s3.amazonaws.com/moat-sdk-builds/com/google/firebase/firebase-messaging/maven-metadata.xml.
> Could not get resource 'https://s3.amazonaws.com/moat-sdk-builds/com/google/firebase/firebase-messaging/maven-metadata.xml'.
> Could not GET 'https://s3.amazonaws.com/moat-sdk-builds/com/google/firebase/firebase-messaging/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.google.android.gms:play-services-location:[10.2.1, 12.1.0).
Required by:
project :appName > com.onesignal:OneSignal:3.10.9
> Failed to list versions for com.google.android.gms:play-services-location.
> Could not list versions using M2 pattern 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/android/gms/play-services-location/'.
> Could not GET 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/android/gms/play-services-location/'. Received status code 400 from server: Bad Request
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not get resource 'https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Could not GET 'https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.google.android.gms:play-services-base:[10.2.1, 12.1.0).
Required by:
project :appName > com.onesignal:OneSignal:3.10.9
> Failed to list versions for com.google.android.gms:play-services-base.
> Could not list versions using M2 pattern 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/android/gms/play-services-base/'.
> Could not GET 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master/com/google/android/gms/play-services-base/'. Received status code 400 from server: Bad Request
> Failed to list versions for com.google.android.gms:play-services-base.
> Unable to load Maven meta-data from https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-base/maven-metadata.xml.
> Could not get resource 'https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-base/maven-metadata.xml'.
> Could not GET 'https://s3.amazonaws.com/moat-sdk-builds/com/google/android/gms/play-services-base/maven-metadata.xml'. Received status code 403 from server: Forbidden
* Try:
Run with --stacktrace option to get the stack trace. Run with --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 23s
Error running command, return code: 1.
我觉得这里可疑的是OneSignal。因此,我将 the workaround in here 应用于 OneSignal,但我最近构建的 apk 在启动时崩溃了。所以解决方法对我不起作用。
我的一般 gradle 文件如下:
buildscript {
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.31.2'
}
}
allprojects {
repositories {
google()
mavenLocal()
mavenCentral()
jcenter()
}
}
这是我的应用 gradle 文件:
/** GENERATE CMAKEFILES.TXT FOR GAME CLASSES **/
file("../../Classes/cmake/CMakeLists.txt").withWriter("utf-8") { writer ->
writer.writeLine("\n# APP NAME AUTOGENERATED CMAKELISTS FILE, DO NOT DELETE #\n")
writer.writeLine("set(GAME_SOURCE")
project.fileTree("../../Classes").matching {
include "**/**.cpp"
include "**/**.c"
}.sort().forEach { file ->
writer.writeLine("\t${file.path}")
}
writer.writeLine(")\n\n")
writer.write("set(GAME_HEADER\n")
project.fileTree("../../Classes").matching {
include "**/**.hpp"
include "**/**.h"
}.sort().forEach { file ->
writer.writeLine("\t${file.path}")
}
writer.writeLine(")\n\n")
}
/*********************************************/
buildscript {
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
maven { url 'https://plugins.gradle.org/m2/'}//onesignal
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
//noinspection GradleDynamicVersion
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.company.appName"
minSdkVersion 15
targetSdkVersion 28
versionCode 111908
versionName "1.119"
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "*****************************",
onesignal_google_project_number: "REMOTE"]
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
externalNativeBuild {
if(PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
targets 'appName'
def module_paths = [project.file("../../cocos2d").absolutePath,
project.file("../../cocos2d/cocos").absolutePath,
project.file("../../cocos2d/external").absolutePath]
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments 'APP_PLATFORM=android-' + PROP_TARGET_SDK_VERSION
arguments '-j' + Runtime.runtime.availableProcessors()
if (OperatingSystem.current().isWindows()) {
module_paths = module_paths.collect {it.replaceAll('\\', '/')}
arguments 'NDK_MODULE_PATH=' + module_paths.join(";")
} else {
arguments 'NDK_MODULE_PATH=' + module_paths.join(':')
}
}
} else if(PROP_BUILD_TYPE == 'cmake') {
cmake {
targets 'appName'
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE"
cppFlags "-frtti -fexceptions -fsigned-char"
}
}
}
}
dexOptions {
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
sourceSets.main {
java.srcDir "src"
res.srcDir "res"
jniLibs.srcDirs = ['jniLibs']
jni.srcDirs = []
manifest.srcFile "AndroidManifest.xml"
assets.srcDir "../../Resources"
}
externalNativeBuild {
if(PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
path "jni/Android.mk"
}
} else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}
}
}
signingConfigs {
release {
def userHomePath = System.properties['user.home']
def propertyFile = new File(userHomePath, ".gradle/gradle.properties") // Can be signing.properties as well
if (propertyFile.canRead()){
Properties props = new Properties()
props.load(new FileInputStream(propertyFile))
// Loading credentials from props
storeFile file(props['RELEASE_STORE_FILE'])
storePassword props['RELEASE_STORE_PASSWORD']
keyAlias props['RELEASE_KEY_ALIAS']
keyPassword props['RELEASE_KEY_PASSWORD']
}
}
}
useLibrary 'org.apache.http.legacy'
buildTypes {
release {
ext.alwaysUpdateBuildId = true
zipAlignEnabled false
debuggable false
jniDebuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=0'
}
}
}
debug {
ext.alwaysUpdateBuildId = false // prevent fabric.io to generate id
debuggable true
jniDebuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=1'
}
}
}
}
/*
// This is required for the gradle automation.
// Source https://medium.com/mindorks/how-did-i-automate-the-generation-of-release-apk-3e42b6540a4a
TLDR;
Also notice that I have added lintOptions which ignores errors at build time. This is needed for our automate script to work.
If lintOptions are not disabled, it gives the error belov
▸ org.xmlpull.v1.XmlPullParserException: expected: /meta read: HEAD (position:END_TAG </HEAD>@2:32 in java.io.InputStreamReader@4b80c948)
*/
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
repositories {
google()
jcenter()
mavenCentral()
flatDir {
dirs 'libs'
}
maven { url 'https://maven.google.com' }
maven { url 'https://maven.fabric.io/public' }
maven { url 'http://repo.admost.com:8081/artifactory/admost' }
//maven { url 'http://repo.admost.com:8081/artifactory/test-before-publish' }
maven { url 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master' }
maven { url 'https://vungle.bintray.com/vungle-android-beta' }
maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
maven { url "http://dl.appnext.com/" }
maven { url 'https://jitpack.io' }
maven { url 'https://dl.bintray.com/pubnative/maven' }
}
crashlytics {
enableNdk true
}
rootProject.allprojects.each(){
it.repositories {
flatDir dirs: (projectDir.absolutePath+'/libs')
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':libcocos2dx')
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.core:core:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-plus:17.0.0'
implementation 'com.google.android.gms:play-services-games:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.android.gms:play-services-basement:17.1.1'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.3'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
//'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
implementation 'com.google.firebase:firebase-ads:19.0.0'
implementation 'com.google.firebase:firebase-config:19.1.1'
implementation 'com.adjust.sdk:adjust-android:4.16.0'
//noinspection GradleDynamicVersion
implementation 'com.facebook.android:facebook-android-sdk:5.+'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.onesignal:OneSignal:3.11.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.exoplayer:exoplayer:2.8.3'
implementation 'com.android.volley:volley:1.1.0'
implementation 'io.branch.sdk.android:library:2.19.5'
// AMR
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.admost.sdk:amr:2.0.7'
implementation 'com.admost.sdk:admost:0.0.6.a16'
implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation 'com.google.android.gms:play-services-ads:17.2.1'
implementation 'com.admost.sdk:admob-gt-17.2.0-adapter:1.0.2.a16'
implementation 'com.admost.sdk:adcolony:4.1.2.a16'
implementation 'com.admost.sdk:chartboost:7.5.0.a16'
implementation 'com.admost.sdk:facebook:5.6.1.a16'
implementation 'com.admost.sdk:hyprmx-adapter:5.0.1.a16'
implementation 'com.hyprmx.android:HyprMX-SDK:5.0.1'
implementation 'com.admost.sdk:ironsource:6.13.0.1.a16'
implementation 'com.admost.sdk:mintegral:10.2.1.a16'
implementation 'com.admost.sdk:ogury:4.3.7.a16'
implementation 'net.pubnative:hybid.sdk:0.7.1'
implementation 'com.admost.sdk:pubnative-adapter:0.7.1.a16'
implementation 'com.admost.sdk:qumpara:0.3.3.a16'
implementation 'com.admost.sdk:tapjoy:12.4.2.a16'
implementation 'com.admost.sdk:unity:3.4.0.a16'
implementation 'com.vungle:publisher-sdk-android:6.5.1'
implementation 'com.admost.sdk:vungle-adapter:6.5.1.a16'
implementation name: 'mcprime', ext: 'aar'
implementation name: 'mcgoliath', ext: 'aar'
implementation (name:'ADTUnityAdsAdapter3.0.1',ext:'aar')
}
apply plugin: 'com.google.gms.google-services'
Gradle 包装属性文件:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
你有解决这个问题的想法吗?请帮我。谢谢你的时间。
我的队友 Erman 解决了这个问题。我想与您分享解决方案。我将分享可以成功构建应用程序的 gradle 文件。你应该分析一下新旧的区别。
主要gradle
buildscript {
repositories {
google()
mavenLocal()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.31.2'
}
}
**app module gradle**
/** GENERATE CMAKEFILES.TXT FOR GAME CLASSES **/
file("../../Classes/cmake/CMakeLists.txt").withWriter("utf-8") { writer ->
writer.writeLine("\n# APP NAME AUTOGENERATED CMAKELISTS FILE, DO NOT DELETE #\n")
writer.writeLine("set(GAME_SOURCE")
project.fileTree("../../Classes").matching {
include "**/**.cpp"
include "**/**.c"
}.sort().forEach { file ->
writer.writeLine("\t${file.path}")
}
writer.writeLine(")\n\n")
writer.write("set(GAME_HEADER\n")
project.fileTree("../../Classes").matching {
include "**/**.hpp"
include "**/**.h"
}.sort().forEach { file ->
writer.writeLine("\t${file.path}")
}
writer.writeLine(")\n\n")
}
/*********************************************/
allprojects {
repositories {
google()
mavenLocal()
jcenter()
}
}
buildscript {
repositories {
google()
mavenLocal()
jcenter()
maven { url 'https://plugins.gradle.org/m2/'}//onesignal
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
//noinspection GradleDynamicVersion
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.company.appName"
minSdkVersion 16
targetSdkVersion 29
versionCode 111908
versionName "1.119"
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "*************************",
onesignal_google_project_number: "REMOTE"]
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
externalNativeBuild {
if(PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
targets 'appName'
def module_paths = [project.file("../../cocos2d").absolutePath,
project.file("../../cocos2d/cocos").absolutePath,
project.file("../../cocos2d/external").absolutePath]
arguments 'NDK_TOOLCHAIN_VERSION=clang'
arguments 'APP_PLATFORM=android-' + PROP_TARGET_SDK_VERSION
arguments '-j' + Runtime.runtime.availableProcessors()
if (OperatingSystem.current().isWindows()) {
module_paths = module_paths.collect {it.replaceAll('\\', '/')}
arguments 'NDK_MODULE_PATH=' + module_paths.join(";")
} else {
arguments 'NDK_MODULE_PATH=' + module_paths.join(':')
}
}
} else if(PROP_BUILD_TYPE == 'cmake') {
cmake {
targets 'appName'
arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE"
cppFlags "-frtti -fexceptions -fsigned-char"
}
}
}
}
dexOptions {
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
sourceSets.main {
java.srcDir "src"
res.srcDir "res"
jniLibs.srcDirs = ['jniLibs']
jni.srcDirs = []
manifest.srcFile "AndroidManifest.xml"
assets.srcDir "../../Resources"
}
externalNativeBuild {
if(PROP_BUILD_TYPE == 'ndk-build') {
ndkBuild {
path "jni/Android.mk"
}
} else if (PROP_BUILD_TYPE == 'cmake') {
cmake {
path "../../CMakeLists.txt"
}
}
}
signingConfigs {
release {
def userHomePath = System.properties['user.home']
def propertyFile = new File(userHomePath, ".gradle/gradle.properties") // Can be signing.properties as well
if (propertyFile.canRead()){
Properties props = new Properties()
props.load(new FileInputStream(propertyFile))
// Loading credentials from props
storeFile file(props['RELEASE_STORE_FILE'])
storePassword props['RELEASE_STORE_PASSWORD']
keyAlias props['RELEASE_KEY_ALIAS']
keyPassword props['RELEASE_KEY_PASSWORD']
}
}
}
useLibrary 'org.apache.http.legacy'
buildTypes {
release {
ext.alwaysUpdateBuildId = true
zipAlignEnabled false
debuggable false
jniDebuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=0'
}
}
}
debug {
ext.alwaysUpdateBuildId = false // prevent fabric.io to generate id
debuggable true
jniDebuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=1'
}
}
}
}
/*
// This is required for the gradle automation.
// Source https://medium.com/mindorks/how-did-i-automate-the-generation-of-release-apk-3e42b6540a4a
TLDR;
Also notice that I have added lintOptions which ignores errors at build time. This is needed for our automate script to work.
If lintOptions are not disabled, it gives the error belov
▸ org.xmlpull.v1.XmlPullParserException: expected: /meta read: HEAD (position:END_TAG </HEAD>@2:32 in java.io.InputStreamReader@4b80c948)
*/
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
repositories {
google()
mavenLocal()
jcenter()
flatDir {
dirs 'libs'
}
maven { url 'https://maven.fabric.io/public' }
maven { url 'http://repo.admost.com:8081/artifactory/admost' }
//maven { url 'http://repo.admost.com:8081/artifactory/test-before-publish' }
//maven { url 'https://raw.githubusercontent.com/HyprMXMobile/Android-SDKs/master' }
maven { url 'https://vungle.bintray.com/vungle-android-beta' }
//maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
maven { url "http://dl.appnext.com/" }
maven { url 'https://jitpack.io' }
maven { url 'https://dl.bintray.com/pubnative/maven' }
}
crashlytics {
enableNdk true
}
rootProject.allprojects.each(){
it.repositories {
flatDir dirs: (projectDir.absolutePath+'/libs')
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':libcocos2dx')
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.core:core:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-plus:17.0.0'
implementation 'com.google.android.gms:play-services-games:19.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.android.gms:play-services-basement:17.1.1'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation 'com.google.android.gms:play-services-ads:19.0.0'
implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.3'
implementation 'com.google.firebase:firebase-messaging:20.1.3'
//'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
implementation 'com.google.firebase:firebase-ads:19.0.0'
implementation 'com.google.firebase:firebase-config:19.1.3'
implementation 'com.adjust.sdk:adjust-android:4.16.0'
//noinspection GradleDynamicVersion
implementation 'com.facebook.android:facebook-android-sdk:5.+'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.exoplayer:exoplayer:2.8.3'
implementation 'com.android.volley:volley:1.1.0'
implementation 'io.branch.sdk.android:library:2.19.5'
// AMR
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.admost.sdk:amr:2.0.7'
implementation 'com.admost.sdk:admost:0.0.6.a16'
implementation 'com.admost.sdk:admob-gt-17.2.0-adapter:1.0.2.a16'
implementation 'com.admost.sdk:adcolony:4.1.2.a16'
implementation 'com.admost.sdk:chartboost:7.5.0.a16'
implementation 'com.admost.sdk:facebook:5.6.1.a16'
//implementation 'com.admost.sdk:hyprmx-adapter:5.0.1.a16'
//implementation 'com.hyprmx.android:HyprMX-SDK:5.0.1'
implementation 'com.admost.sdk:ironsource:6.13.0.1.a16'
implementation 'com.admost.sdk:mintegral:10.2.1.a16'
implementation 'com.admost.sdk:ogury:4.3.7.a16'
implementation 'net.pubnative:hybid.sdk:0.7.1'
implementation 'com.admost.sdk:pubnative-adapter:0.7.1.a16'
implementation 'com.admost.sdk:qumpara:0.3.3.a16'
implementation 'com.admost.sdk:tapjoy:12.4.2.a16'
implementation 'com.admost.sdk:unity:3.4.0.a16'
implementation 'com.vungle:publisher-sdk-android:6.5.1'
implementation 'com.admost.sdk:vungle-adapter:6.5.1.a16'
implementation name: 'mcprime', ext: 'aar'
implementation name: 'mcgoliath', ext: 'aar'
implementation (name:'ADTUnityAdsAdapter3.0.1',ext:'aar')
}
apply plugin: 'com.google.gms.google-services'