skip to Main Content

I am having the following issue, and could not find any solution:

enter image description here

Build.gradle :

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 (project) :

// 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
}

I can compile fine on the simulator, but cannot build or generate signed APK.

2

Answers


  1. Add this line in your build.gradle

    Use Build tool version

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

    And you can merge this code into same if you want

    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.+'
        }
    }
    
    Login or Signup to reply.
  2. Upgrade to MoPub 5.1.0. This was a conflict due to Proguard obfuscation of the Moat SDK distributed to both MoPub (com.mopub:mopub-sdk:5.0.0@aar) and Millennial (android-ad-sdk).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search