Android Studio和Gradle Upgrade面临问题,同时实现MobFox的第三方依赖项

问题描述 投票:0回答:1

升级Android Studio和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

我试过以下选项,

  1. 无效缓存/重新启动
  2. 使用的实现而不是编译
//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成功运行

android gradle android-gradle
1个回答
0
投票
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')
}
© www.soinside.com 2019 - 2024. All rights reserved.