首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >程序类型已存在

程序类型已存在
EN

Stack Overflow用户
提问于 2018-06-13 17:08:59
回答 2查看 3.3K关注 0票数 2

我遇到了以下问题,找不到任何解决方案:

Build.gradle:

代码语言:javascript
复制
apply plugin: 'com.android.application'

android {
    /*signingConfigs {
        config_release {
            keyAlias 'XXXXXXX'
            keyPassword XXXXXXX'
            storeFile file('C:/Users/...')
            storePassword 'XXXXXXX'
        }
    }*/
    compileSdkVersion  27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "XXXXXXX"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 126
        versionName "1.3.1"
        multiDexEnabled true
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

            lintOptions {
                disable 'MissingTranslation'
            }
        }
    }
}

allprojects {
    repositories {
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}

apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
    maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
    maven { url 'https://maven.google.com' } // necessary for Android API 26
    maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
    maven { url 'http://maven.gameanalytics.com/release' }
    maven { url "https://dl.bintray.com/ironsource-mobile/android-sdk" }
    maven { url "http://dl.appnext.com/" }
    maven { url "https://jitpack.io" }
    maven {
        name "Tapjoy's maven repo"
        url "https://tapjoy.bintray.com/maven"
    }
}

dependencies {
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.android.support:design:27.1.0'
    implementation project(':facebook-android-sdk-4.8.1')
    implementation files('libs/parse-android-1.13.1.jar')
    implementation files('libs/bolts-android-1.4.0.jar')
    implementation files('libs/bolts-tasks-1.4.0.jar')
    implementation project(':facebook-android-sdk-4.8.1')
    implementation files('libs/ParseFacebookUtilsV4-1.10.3.jar')
    implementation files('libs/greendao-1.3.7.jar')
    implementation('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
        transitive = true
    }
    implementation('com.mopub:mopub-sdk:5.0.0@aar') {
        transitive = true
    }
    implementation 'com.thinkincode.utils:Android:0.1.8'
    implementation 'com.google.firebase:firebase-core:15.0.2'
    implementation 'com.google.firebase:firebase-messaging:15.0.2'
    implementation 'com.google.firebase:firebase-ads:15.0.1'
    implementation 'com.google.android.gms:play-services-ads:15.0.1'
    implementation 'com.google.android.gms:play-services-basement:15.0.1'
    implementation 'com.google.android.gms:play-services-location:15.0.1'
    implementation 'com.google.android.gms:play-services-base:15.0.1'
    implementation 'com.android.installreferrer:installreferrer:1.0'
    implementation 'com.github.Slyce-Inc:SlyceMessaging:1.1.2'
    implementation 'com.applovin:applovin-sdk:8.0.1'
    implementation 'com.mixpanel.android:mixpanel-android:5.0.0'
    implementation 'com.github.vungle:vungle-android-sdk:6.2.5'
    implementation files('libs/dagger-2.7.jar')
    implementation files('libs/javax.inject-1.jar')
    implementation(name: 'unity-ads', ext: 'aar')
    implementation 'com.gameanalytics.sdk:gameanalytics-android:3.4.2'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.facebook.android:audience-network-sdk:4.28.2'
    implementation 'com.ironsource.sdk:mediationsdk:6.7.9@jar'
    implementation(name: 'mopubadapters-release', ext: 'aar')
    implementation files('libs/AppTracker.jar')
    implementation files('libs/MoPubAppTracker.jar')
    implementation 'com.appnext.sdk.adapters:mopub-ads:2.+'
    implementation 'com.tapjoy:tapjoy-android-sdk:11.12.2@aar'
    implementation(name: 'adzone-android-core', ext: 'aar')
    implementation(name: 'adzone-android-mopub', ext: 'aar')
    implementation project(':tenjin')
    implementation project(':android-ad-sdk')
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.android.application'

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '26.1.0'
            }
        }
    }
}

Build.gradle (项目):

代码语言:javascript
复制
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:3.3.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
        google()
    }

    dependencies {
        // These docs use an open ended version so that our plugin
        // can be updated quickly in response to Android tooling updates

        // We recommend changing it to the latest version from our changelog:
        // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

allprojects {
    repositories {
        maven {
            url 'https://maven.google.com'
        }
        jcenter()
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

我可以在模拟器上编译得很好,但不能构建或生成签名的APK。

EN

回答 2

Stack Overflow用户

发布于 2018-06-13 17:16:10

将此行添加到您的build.gradle

使用生成工具版本

代码语言:javascript
复制
 buildToolsVersion '27.1.1'

   implementation 'com.android.support:appcompat-v7:27.0.2'

如果您愿意,您可以将此代码合并到相同的代码中

代码语言:javascript
复制
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:3.3.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
        google()
    }

    dependencies {
        // These docs use an open ended version so that our plugin
        // can be updated quickly in response to Android tooling updates

        // We recommend changing it to the latest version from our changelog:
        // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
票数 0
EN

Stack Overflow用户

发布于 2018-06-15 02:03:21

升级到MoPub 5.1.0。由于对同时分发到MoPub (com.mopub:mopub-sdk:5.0.0@aar)和千禧年(android-ad-sdk)的Moat SDK进行了防范混淆而导致的This was a conflict

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50833325

复制
相关文章

相似问题

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