在升级了Android和Gradle版本之后,对于MobFox的第三方依赖关系,我得到了以下错误。
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.mobfox.MobFox-Android-SDK-Core:MobFox-Android-SDK-Core:3.6.8. Show Details Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.github.mobfox.MobFox-Android-SDK-Core:MobFox-Android-SDK-Core:3.6.8. Show Details Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.github.mobfox.MobFox-Android-SDK-Core:MobFox-Android-SDK-Core:3.6.8. Show Details Affected Modules: app
ERROR: Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve com.github.mobfox.MobFox-Android-SDK-Core:MobFox-Android-SDK-Core:3.6.8. Show Details Affected Modules: app
ERROR: Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.github.mobfox.MobFox-Android-SDK-Core:MobFox-Android-SDK-Core:3.6.8. Show Details Affected Modules: app我试过以下选择,
//noinspection GradleCompatible
apply plugin: 'com.android.application'
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.scriptlog.garbavali"
minSdkVersion 19
targetSdkVersion 26
versionCode 9
versionName "9"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.startapp:inapp-sdk:3.12.3'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-
core:2.2.2', {
exclude group: 'com.android.support', module: 'support-
annotations'
})
implementation 'com.android.support:appcompat-v7:27.0.1'
//noinspection GradleCompatible
implementation 'com.android.support:cardview-v7:27.0.1'
implementation 'com.android.support:design:27.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
//noinspection GradleCompatible
implementation 'com.google.android.gms:play-services-ads:16.0.0'
implementation 'com.github.mobfox.MobFox-Android-SDK-Core:MobFox-Android-SDK-Core:3.6.8'
implementation 'junit:junit:4.12'
}期望Gradle成功运行
发布于 2019-04-01 04:00:48
Use the latest .jar of MobFox directly.
1. Download this from link 'https://github.com/mobfox/MobFox-Android-SDK'
2. copy this in your project libs folder like 'MyApplication\app\libs'
3. Modify your app/build.gradle to have dependency as.
dependencies {
...
implementation files('libs/MobFox-Android-SDK-Core-latest.jar')
}发布于 2019-08-30 14:34:20
我已经尝试了下面的方法,它对我是有效的,但需要验证这是否是推荐的方法。
dependencies {
...
implementation 'com.github.mobfox:mfx-android-sdk:v4.0.7'
} https://stackoverflow.com/questions/55444212
复制相似问题