I would like to release apk but I got this error :
Error:Execution failed for task ':nutella:transformJackWithJackForRelease'.
> com.android.sched.scheduler.RunnerProcessException: Error during 'ShrinkAndMainDexTracer' runner on 'public final class com.google.ads.mediation.admob.AdMobAdapter'
my gradle file :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '24.0.0'
defaultConfig {
applicationId "***.***.***"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
jackOptions {
enabled true
}
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
javaMaxHeapSize "2g"
incremental true
preDexLibraries = false
}
}
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'https://raw.github.com/felipecsl/m2repository/master' }
// maven { url "https://jitpack.io" }
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.github.florent37:materialviewpager:1.2.0#aar') {
transitive = true
}
compile files('libs/volley.jar')
compile files('libs/gson-2.2.4.jar')
compile files('libs/AndroidViewAnimations-1.1.3.jar')
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:cardview-v7:23.+'
compile 'com.android.support:support-v4:23.2.1'
compile 'com.mohamadamin:persianmaterialdatetimepicker:1.2.1'
compile 'com.pacioianu.david:ink-page-indicator:1.1.1'
compile 'com.github.carlonzo.stikkyheader:core:0.0.3-SNAPSHOT'
compile 'com.alexvasilkov:foldable-layout:1.2.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.alexvasilkov:android-commons:1.2.4'
compile 'com.melnykov:floatingactionbutton:1.0.7'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.ksoichiro:android-observablescrollview:1.5.0'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.github.FuckBoilerplate:RxPaparazzo:0.1.0'
compile 'io.reactivex:rxjava:1.1.5'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'com.google.android.gms:play-services-maps:9.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
testCompile 'junit:junit:4.12'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.chrisbanes:PhotoView:1.3.0'
compile 'com.google.android.gms:play-services-location:9.4.0'
compile 'com.akexorcist:googledirectionlibrary:1.0.4'
}
This problem has been fixed in buildToolsVersion '25.0.2'
Related
I am getting error Unable to merge dex, try everything on stackoverflow
buildscript {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
flatDir {
dirs 'libs'
}
mavenCentral()
}
def daggerVersion = '2.8'
android {
compileSdkVersion 28
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.upliftapp"
minSdkVersion 21
targetSdkVersion 28
versionCode 39
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resConfigs "en"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// shrinkResources = true
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.2'
//force 'com.android.support:support-v4:27.1.0'
}
}
}
}
dexOptions {
javaMaxHeapSize "4g"
}
aaptOptions {
cruncherEnabled false
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.twitter.sdk.android:twitter:1.14.1#aar') {
transitive = true;
}
compile('com.twitter.sdk.android:tweet-composer:1.0.5#aar') {
transitive = true;
}
compile project(':ViewPagerIndicator-Library')
compile project(':library_imageloading')
compile project(':ShortcutBadgerLib')
compile project(':CircleProgressView')
compile project(':StickyHeaderLibrary')
compile project(':VideoLibtoro')
compile project(':token_textview_library')
compile project(':swap_lib')
compile project(':library_parallaxeffect')
compile project(':curton_library')
compile project(':fullscreenvideoview')
compile project(':android-volley-master')
compile 'com.github.clans:fab:1.6.4'
compile "com.android.support:appcompat-v7:28.+"
compile 'com.android.support:design:28.+'
compile 'com.android.support:cardview-v7:28.+'
compile 'com.android.support:support-v4:28.+'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.android.support:recyclerview-v7:28.+'
compile 'com.facebook.fresco:fresco:0.9.0'
compile 'com.mixpanel.android:mixpanel-android:4.+'
compile 'com.facebook.android:facebook-android-sdk:4.35.0'
compile 'com.crittercism:crittercism-android-agent:+'
compile 'com.google.android.gms:play-services-base:+'
implementation 'com.google.android.gms:play-services-maps:+'
implementation 'com.google.android.gms:play-services-appindexing:+'
compile 'com.orhanobut:logger:1.15'
compile 'org.java-websocket:Java-WebSocket:1.3.0'
/*compile 'com.amazonaws:aws-android-sdk-s3:2.2.+'
compile 'com.amazonaws:aws-android-sdk-core:2.2.+'
compile 'com.amazonaws:aws-android-sdk-ddb:2.2.+'*/
compile 'com.amazonaws:aws-android-sdk-s3:2.+'
compile 'com.amazonaws:aws-android-sdk-core:2.+'
compile 'com.amazonaws:aws-android-sdk-ddb:2.+'
compile 'com.google.code.gson:gson:2.6.2'
compile 'net.ypresto.androidtranscoder:android-transcoder:0.1.10'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.instabug.library:instabug:8.0.13'
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.0'
compile 'com.github.stfalcon:frescoimageviewer:0.4.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.etsy.android.grid:library:1.+'
compile 'com.jpeng:LoadingProgress:1.1.0'
compile 'com.theartofdev:fast-image-loader:0.8.+'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'in.srain.cube:ultra-ptr:1.0.11'
testCompile 'junit:junit:4.12'
compile project(':library_scrollable')
compile 'io.branch.sdk.android:library:2.+'
compile 'com.appsflyer:af-android-sdk:4+#aar'
compile 'com.vdurmont:emoji-java:3.1.3'
compile project(':bettervideoplayer')
compile 'com.makeramen:roundedimageview:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.8.0'
implementation project(':emojify_new')
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.github.nkzawa:socket.io-client:0.3.0'
implementation 'com.wowza.gocoder.sdk.android:com.wowza.gocoder.sdk:2.0#aar'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-iid:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
compile 'com.google.firebase:firebase-crash:9.4.0'
implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation "com.google.dagger:dagger:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
error log
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Have you tried updaing your libraries? also drop the compile keyword and replace it with implementation
Am adding learncoding project to my project us module dependency but it shows this error.
Any one please help me. below gradle is my app's gradle
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
aaptOptions {
cruncherEnabled = false
}
defaultConfig {
applicationId "com.droidacademy.codings"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
// Enabling multidex support.
multiDexEnabled true
}
sourceSets {
main {
assets.srcDirs = ['src/main/assets', 'src/main/assets/', 'src/main/assets/c_outputs']
res.srcDirs = ['src/main/res', 'src/main/res/anim', 'src/main/res/layout-sw600dp']
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
mavenCentral()
jcenter()
}
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile files('libs/volley.jar')
compile files('libs/achartengine-1.0.0.jar')
compile files('libs/gson-1.7.jar')
compile 'com.github.florent37:materialtextfield:1.0.5'
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.felipecsl.asymmetricgridview:library:2.0.1'
compile files('libs/mail.jar')
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'
compile 'com.intuit.sdp:sdp-android:1.0.4'
compile 'com.squareup.picasso:picasso:2.5.2'
implementation project(':learncodings')
}
and this is my module app's Gradle
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
aaptOptions {
cruncherEnabled = false
}
defaultConfig {
applicationId "com.whalts.learncoding"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-ads:9.2.0'
}
Go to File\Settings\Gradle. Deselect the "Offline work" box.
If this didn't work Try to Invalidate Cache/Restart
Getting this error on run time for the application but compilation is succesfully.
ERROR
Error:Failed to capture snapshot of input files for task 'compileDebugJavaWithJavac' property 'classpath' during up-to-date check.> Failed to create MD5 hash for file 'F:\Projects\Table42\trunk\app\libs\appsee.jar'.
my gradle ::
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId 'com.imate.android'
minSdkVersion 19
targetSdkVersion 19
versionCode 15
versionName "1.14"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
buildTypes {
release {
debuggable false
buildConfigField "boolean", "DEBUG_MODE", "false"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
buildConfigField "boolean", "DEBUG_MODE", "true"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-annotations:23.1.1'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.20.1'
}
}
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/org.apache.http.legacy.jar')
compile files('libs/appsee.jar')
compile files('libs/AF-Android-SDK-v2.3.1.18.jar')
compile('com.github.nkzawa:socket.io-client:0.3.0') {
exclude group: 'org.json', module: 'json'
}
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.facebook.android:facebook-android-sdk:4.16.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.mcxiaoke.volley:library:1.0.15'
compile 'com.android.support:support-v13:23.2.0'
compile 'com.edmodo:rangebar:1.0.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:design:26.0.0'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.guava:guava-collections:r03'
compile 'com.lorentzos.swipecards:library:1.0.9'
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'
compile 'com.jakewharton:butterknife:8.2.1'
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile 'com.github.bumptech.glide:glide:3.4.+'
compile('com.twitter.sdk.android:twitter:2.3.2#aar') {
transitive = true;
}
compile('io.nlopez.smartlocation:library:3.3.1') {
transitive = false
}
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'com.stripe:stripe-android:4.0.1'
compile "com.github.miguelbcr:RxPaparazzo:0.5.2-2.x"
compile 'com.afollestad.material-dialogs:core:0.9.4.4'
compile 'org.honorato.multistatetogglebutton:multistatetogglebutton:0.2.2'
testCompile 'junit:junit:4.12'
compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
compile "com.android.support:design:$rootProject.supportLibraryVersion"
androidTestCompile "com.android.support:support-annotations:$rootProject.ext.supportAnnotationsversion"
// Android Testing Support Library's runner and rules
androidTestCompile "com.android.support.test:runner:$rootProject.ext.runnerVersion"
androidTestCompile "com.android.support.test:rules:$rootProject.ext.rulesVersion"
// Espresso UI Testing dependencies.
androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion"
compile 'com.google.firebase:firebase-messaging:9.0.2'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
//geofire
compile 'com.firebase:geofire-android:2.1.1'
compile 'com.google.zxing:core:3.2.1'
compile 'com.braintreepayments.api:drop-in:3.+'
compile 'com.journeyapps:zxing-android-embedded:3.5.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.ratty3697:android-smart-animation-library:1.6'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
compile project(path: ':firebase')
}
apply plugin: 'com.google.gms.google-services'**
this is my build.gradle file please help me out ..
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.androidhive.info.weplanbeta"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
these are the dependencies i think i have organized them properly but still its not running
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.mikepenz:materialdrawer:5.3.1#aar') {
transitive = true
}
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support:design:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.ncapdevi:frag-nav:1.0.3'
compile 'com.roughike:bottom-bar:1.3.9'
compile 'com.android.support:support-v4:25.3.0'
compile 'com.android.support:recyclerview-v7:25.3.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You should enable lintOptions
android {
...
lintOptions {
checkReleaseBuilds false
abortOnError false
ignoreWarnings true //false
}
}
And
implementation 'com.android.support:appcompat-v7:25.1.0'
implementation 'com.android.support:design:25.1.0'
implementation 'com.android.support:support-v4:25.1.0'
implementation 'com.android.support:recyclerview-v7:25.1.0'
My app.gradle looks like this-:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.transenigma.iskconapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
}
repositories {
maven { url "https://jitpack.io" }
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.parse:parse-android:1.12.0'
compile 'joda-time:joda-time:2.9.1'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.makeramen:roundedimageview:1.5.0'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.9.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'it.neokree:MaterialTabs:0.11'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.0'
}
But when I sync then there is error-:
Error:(50, 13) Failed to resolve: it.neokree:MaterialTabs:0.11
Error:(51, 13) Failed to resolve: com.github.PhilJay:MPAndroidChart:v2.2.0
I have included maven { url "https://jitpack.io" } but still there is error.
I moved it inside the repositries still the same result-:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.transenigma.iskconapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
}
repositories {
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.parse:parse-android:1.12.0'
compile 'joda-time:joda-time:2.9.1'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.makeramen:roundedimageview:1.5.0'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.9.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'it.neokree:MaterialTabs:0.11'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.0'
}
change this
repositories {
maven { url "https://jitpack.io" }
}
repositories {
mavenCentral()
jcenter()
}
to
repositories {
maven { url "https://jitpack.io" }
mavenCentral()
jcenter()
}