首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android和Gradle在实现MobFox的第三方依赖关系时面临的问题

Android和Gradle在实现MobFox的第三方依赖关系时面临的问题
EN

Stack Overflow用户
提问于 2019-03-31 18:42:14
回答 2查看 341关注 0票数 1

在升级了Android和Gradle版本之后,对于MobFox的第三方依赖关系,我得到了以下错误。

代码语言:javascript
复制
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

我试过以下选择,

  1. 使缓存失效/重新启动
  2. 使用实现而不是编译
代码语言:javascript
复制
//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成功运行

EN

回答 2

Stack Overflow用户

发布于 2019-04-01 04:00:48

代码语言:javascript
复制
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')
}
票数 0
EN

Stack Overflow用户

发布于 2019-08-30 14:34:20

我已经尝试了下面的方法,它对我是有效的,但需要验证这是否是推荐的方法。

代码语言:javascript
复制
dependencies {
    ...
    implementation 'com.github.mobfox:mfx-android-sdk:v4.0.7'
} 
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55444212

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档