1

enter image description hereAfter updating android studion 3.2.1 iam getting this error . Actually StreamLib Module is using for supportive module there is no buildscript, allmodules blocks please check the StreamLib.gridle

Could not find com.android.tools.build:aapt2:3.2.1-4818971.
Searched in the following locations:
    file:/Users/user/Library/Android/sdk/extras/m2repository/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom
    file:/Users/user/Library/Android/sdk/extras/m2repository/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971-osx.jar
    file:/Users/user/Library/Android/sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom
    file:/Users/user/Library/Android/sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971-osx.jar
    file:/Users/user/Library/Android/sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971.pom
    file:/Users/user/Library/Android/sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.2.1-4818971/aapt2-3.2.1-4818971-osx.jar
Required by:
    project :StreamingLib


this is the StreamingLib Gridle file : 

apply plugin: 'com.android.library'


android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
       // android.enableAapt2=false
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main {
            jniLibs.srcDirs  'src/main/libs'
            jni.srcDirs = []
        }
    }
}



dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation files('libs/aapt2-3.2.1-4818971-windows.jar')
}

the above StreamingLib using for supportive library for my app please help me ?

this is main level graidle file

buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'

    }
}

apply plugin: 'com.android.application'

repositories {
    google()
    jcenter()
    mavenCentral()
    maven { url "https://jitpack.io" }

}

dependencies {
    implementation 'com.google.android.gms:play-services-gcm:10.2.6'
    implementation 'org.sufficientlysecure:openpgp-api:10.0'
    implementation 'com.soundcloud.android:android-crop:1.0.1@aar'
    implementation 'com.android.support:support-v13:27.1.0'
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'org.bouncycastle:bcprov-jdk15on:1.52'
    implementation 'org.bouncycastle:bcmail-jdk15on:1.52'
    implementation 'org.jitsi:org.otr4j:0.22'
    implementation 'org.gnu.inet:libidn:1.15'
    implementation 'com.google.zxing:core:3.2.1'
    implementation 'com.google.zxing:android-integration:3.2.1'
    implementation 'de.measite.minidns:minidns-hla:0.2.1'
    implementation 'de.timroes.android:EnhancedListView:0.3.4'
    implementation 'me.leolin:ShortcutBadger:1.1.12@aar'
    implementation 'com.kyleduo.switchbutton:library:1.2.8'
    implementation 'org.whispersystems:signal-protocol-java:2.5.3'
    implementation 'com.wefika:flowlayout:0.4.1'
    implementation 'net.ypresto.androidtranscoder:android-transcoder:0.2.0'
    implementation 'com.mcxiaoke.volley:library-aar:1.0.0'
    implementation 'com.googlecode.libphonenumber:libphonenumber:6.2'
    implementation project(':StreamingLib')
}

ext {
    travisBuild = System.getenv("TRAVIS") == "true"
    // allows for -Dpre-dex=false to be set
    preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
}

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 3
        versionName "2.0"
        archivesBaseName += "-$versionName"
        applicationId "com.abc"
        multiDexEnabled true
        //
    }

    dexOptions {
        // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
        preDexLibraries = preDexEnabled && !travisBuild
        javaMaxHeapSize "4g"

    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    if (project.hasProperty('mStoreFile') &&
            project.hasProperty('mStorePassword') &&
            project.hasProperty('mKeyAlias') &&
            project.hasProperty('mKeyPassword')) {
        signingConfigs {
            release {
                storeFile file(mStoreFile)
                storePassword mStorePassword
                keyAlias mKeyAlias
                keyPassword mKeyPassword
            }
        }
        buildTypes.release.signingConfig = signingConfigs.release
    } else {
        buildTypes.release.signingConfig = null
    }

    lintOptions {
        disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource'
    }

    subprojects {

        afterEvaluate {
            if (getPlugins().hasPlugin('android') ||
                    getPlugins().hasPlugin('android-library')) {

                configure(android.lintOptions) {
                    disable 'AndroidGradlePluginVersion', 'MissingTranslation'
                }
            }

        }
    }

    packagingOptions {
        exclude 'META-INF/BCKEY.DSA'
        exclude 'META-INF/BCKEY.SF'
    }


}
Nitya_Bhoomesh
  • 125
  • 1
  • 1
  • 9
  • have you added google() to project level build. – karan Nov 16 '18 at 11:46
  • Why are you adding the dependency manually? The line `implementation fileTree(include: ['*.jar'], dir: 'libs')` should already add it to the dependency list because it's in the libs folder and it's a jar... – MatPag Nov 16 '18 at 11:47
  • 1
    Possible duplicate of [Build errors after Android Studio 3.2.1 upgrade](https://stackoverflow.com/questions/52790020/build-errors-after-android-studio-3-2-1-upgrade) – Nagendra Hari Karthick Nov 16 '18 at 11:47
  • @KaranMer Yes i added google() to project level build – Nitya_Bhoomesh Nov 16 '18 at 11:49
  • make sure you are using compatible gradle version with android plugin https://developer.android.com/studio/releases/gradle-plugin – karan Nov 16 '18 at 11:51
  • @KaranMer please check project level gradle file above – Nitya_Bhoomesh Nov 16 '18 at 12:02
  • 1
    @Nitya_Bhoomesh: add this to your project level gradle after your buildscript completes `allprojects { repositories { jcenter() google() } }` – karan Nov 16 '18 at 12:06
  • @KaranMer its showing another error -> Android resource linking failed Output: warn: removing resource com.abc:string/account_settings_confirm_password without required default value. – Nitya_Bhoomesh Nov 16 '18 at 12:11
  • @Nitya_Bhoomesh: can you try to clean and build? – karan Nov 16 '18 at 12:33
  • @Nitya_Bhoomesh file a new issue for the resource linking error. The only problem here was the missing google(). – Izabela Orlowska Nov 19 '18 at 16:48

0 Answers0