I have same version of libraries still it gives same error.
It gives me error on first library implementation 'com.android.support:support-compat:27.0.2'.
Is there anything missing in gradle ?
I can run build successfully but it gives an error.
I refer some question but still same issue.
I treid below link also
All com.android.support libraries must use the exact same version specification
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.25.1'
classpath 'com.malmstein:fenster:0.0.2'
classpath 'me.tatarka:gradle-retrolambda:3.6.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
}
}
// Required because retrolambda is on maven central
repositories {
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.app.readyb"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
signingConfig signingConfigs.debug
}
signingConfigs {
release {
storeFile file('C:/MyFolder/OrdexAndroid/ORDEXWORK/ReadyB/Keystore/xx.jks')
storePassword 'xx'
keyAlias 'xxxx'
keyPassword 'xxxx'
}
debug {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('C:/Users/BHARATI/.android/debug.keystore')
storePassword 'android'
}
}
buildTypes {
debug {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField 'boolean', 'CRASHLYTICS_ENABLED', 'false'
signingConfig signingConfigs.debug
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField 'boolean', 'CRASHLYTICS_ENABLED', 'true'
signingConfig signingConfigs.release
}
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.2'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// support libraries
implementation 'com.android.support:support-compat:27.0.2'
implementation 'com.android.support:support-core-ui:27.0.2'
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:animated-vector-drawable:27.0.2'
implementation 'com.android.support:support-v13:27.0.2'
implementation 'com.android.support:mediarouter-v7:27.0.2'
implementation 'com.android.support:customtabs:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support:gridlayout-v7:27.0.2'
implementation 'com.android.support:recyclerview-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:support-annotations:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:multidex:1.0.2'
// RxJava
implementation 'io.reactivex.rxjava2:rxjava:2.1.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.0.0'
implementation 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.0.0'
implementation 'com.trello.rxlifecycle2:rxlifecycle:2.1.0'
implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.1.0'
implementation 'com.f2prateek.rx.preferences2:rx-preferences:2.0.0-RC3'
// net
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
implementation 'com.squareup.okhttp3:okhttp:3.8.1'
implementation 'com.google.code.gson:gson:2.8.1'
// dependency injection
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
// dagger
implementation 'com.google.dagger:dagger:2.11'
annotationProcessor 'com.google.dagger:dagger-compiler:2.11'
provided 'javax.annotation:jsr250-api:1.0'
// event bus
implementation 'org.greenrobot:eventbus:3.0.0'
// boilerplate generation
implementation 'org.glassfish:javax.annotation:10.0-b28'
provided 'org.projectlombok:lombok:1.16.18'
annotationProcessor 'org.projectlombok:lombok:1.16.18'
// image loading
implementation 'com.github.bumptech.glide:glide:4.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
// fabric crashlytis library
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
// joda date time library
implementation 'net.danlew:android.joda:2.9.9.1'
// ACProgressLite progress dialog
implementation 'cc.cloudist.acplibrary:library:1.2.1'
// top snackbar
implementation 'com.androidadvance:topsnackbar:1.1.1'
// activation code library
implementation 'online.devliving:passcodeview:1.0.3'
// android stripe api
implementation 'com.stripe:stripe-android:6.0.0'
// java stripe api
implementation 'com.stripe:stripe-java:5.7.1'
// for aws image upload
implementation 'com.amazonaws:aws-android-sdk-core:2.4.6'
implementation 'com.amazonaws:aws-android-sdk-s3:2.4.6'
implementation 'com.amazonaws:aws-android-sdk-ddb:2.4.6'
// for crop image after select or capture image
implementation 'com.soundcloud.android:android-crop:1.0.1#aar'
// rxpermission for android device
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4#aar'
// facebook
implementation 'com.facebook.android:facebook-android-sdk:4.23.0'
// twitter
implementation('com.twitter.sdk.android:twitter:2.3.1#aar') {
transitive = true
}
// video play
implementation 'com.github.halilozercan:BetterVideoPlayer:1.1.0'
// view pager indicator
implementation 'com.romandanylyk:pageindicatorview:0.2.0'
implementation 'com.romandanylyk:pageindicatorview:0.2.0#aar'
// expandable list view like pager
implementation 'com.diegocarloslima:fgelv:0.1.2#aar'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
// full screen dialog
implementation 'com.github.franmontiel:FullScreenDialog:1.0.1'
// material date time picker
//compile 'com.wdullaer:materialdatetimepicker:3.3.1'
implementation ('com.wdullaer:materialdatetimepicker:3.4.0') {
exclude group: 'com.android.support'
}
// capturing video
implementation 'com.otaliastudios:cameraview:1.4.1'
}
apply plugin: 'com.google.gms.google-services'
It's probably due to the fact that some dependency is using some other version. You can force to use a specific version
configurations.all {
resolutionStrategy {
force 'library which you need to force'
}
}
Related
After reformatting my laptop and installed the latest version of android studio
the FCM token generation suddenly stopped.
I updated firebase messaging to 18.0.0
App-level Build.gradle file
android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationId "com.myapp.app"
minSdkVersion 21
targetSdkVersion 26
versionCode 21
versionName "1.0.21"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
}
dexOptions {
javaMaxHeapSize "Xg"
// jumboMode = true
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//noinspection GradleCompatible
implementation 'com.android.support:design:26.1.0'
//noinspection OutdatedLibrary
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.google.code.gson:gson:2.3'
implementation 'com.android.support:multidex:1.0.1'
implementation 'de.hdodenhof:circleimageview:1.2.1'
implementation 'com.github.gcacace:signature-pad:1.2.1'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.soundcloud.android:android-crop:1.0.1#aar'
implementation 'com.github.bumptech.glide:glide:3.5.2'
implementation 'com.google.android.gms:play-services-location:11.4.2'
implementation 'com.google.android.gms:play-services-maps:11.4.2'
implementation 'com.google.android.gms:play-services:11.4.2'
implementation 'com.google.android.gms:play-services-gcm:11.4.2'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
//implementation 'com.google.firebase:firebase-core:11.4.2'
//implementation 'com.google.firebase:firebase-messaging:11.4.2'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'com.intuit.sdp:sdp-android:1.0.5'
implementation 'com.shuhart.stepview:stepview:1.2.6'
implementation 'com.xw.repo:bubbleseekbar:3.6'
implementation 'com.github.andyxialm:ColorDialog:1.0.0'
implementation 'com.github.twinkle942910:monthyearpicker:0.0.1'
implementation 'com.daasuu:EasingInterpolator:1.0.0'
implementation 'com.agrawalsuneet.androidlibs:dotsloader:1.1'
implementation 'io.nlopez.smartlocation:library:3.3.3'
implementation 'com.bogdwellers:pinchtozoom:0.1'
implementation 'org.jsoup:jsoup:1.8.3'
implementation 'com.wdullaer:materialdatetimepicker:2.3.0'
implementation 'com.airbnb.android:lottie:2.5.0-rc1'
implementation 'com.razorpay:checkout:1.5.5'
implementation 'com.google.zxing:core:3.2.1'
}
apply plugin: 'com.google.gms.google-services'
Project Level Build.gradle file
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.1.0'
classpath 'io.fabric.tools:gradle:1.25.4'
}
}
all projects {
repositories {
jcenter()
maven {
url "https://maven.google.com" // Google's Maven repository
}
maven { url "https://jitpack.io" }
//mavenCentral()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Getting Error
error: cannot access zzbck
class file for com.google.android.gms.internal.zzbck not found
tried to change this with
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services:16.0.0'
implementation 'com.google.android.gms:play-services-gcm:16.0.0'
I have tried almost every solution there is on StackOverflow I recently updated my SDK from 27 to 28 and now on deploying my app, it gives me this error if I rollback the update it gives me resource linking error in merged.dir values XML before this my app was working correctly
My App Gradle build is
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.tech.usman.securityapp"
minSdkVersion 15
targetSdkVersion 28
versionCode 3
versionName "2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
/*release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}*/
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
pickFirst 'META-INF/LICENSE.txt' // picks the JavaMail license file
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'com.google.android.material:material:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0-beta01'
implementation 'androidx.vectordrawable:vectordrawable:1.0.0-beta01'
implementation 'com.google.firebase:firebase-messaging:17.4.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.android.support:appcompat-v7:27.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.android.support:design:27.0.1'
implementation 'com.github.ceryle:RadioRealButton:v2.1.1'
implementation 'com.android.support:support-v4:27.0.1'
implementation 'com.android.support:support-vector-drawable:27.0.1'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
// retrofit, gson
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
//implementation 'com.github.faruktoptas:FancyShowCaseView:1.0.0'
//circular progress
implementation 'com.github.rahatarmanahmed:circularprogressview:2.5.0'
//tray
implementation 'net.grandcentrix.tray:tray:0.12.0'
implementation('io.socket:socket.io-client:1.0.0') {
exclude group: 'org.json', module: 'json'
}
//http
//http looging
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
//dextor
implementation 'com.karumi:dexter:5.0.0'
//event bus
implementation 'org.greenrobot:eventbus:3.1.1'
//rx java
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.0'
implementation 'ru.rambler.android:swipe-layout:1.0.15'
implementation 'com.android.support:recyclerview-v7:27.0.1'
}
And my project gradle build previously my gradle tool version was com.android.tools.build:gradle:3.1.4
buildscript {
repositories {
google()
jcenter()
/*maven {
url 'https://maven.fabric.io/public'
}*/
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.google.gms:google-services:4.0.1'
//classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
maven {
url "https://maven.java.net/content/groups/public/"
}
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The full problem is:
error: Could not find the AndroidManifest.xml file, using generation folder [/Users/gopublic/bamboo-home/xml-data/build-dir/131073/REF-RD-VRANDROID/app/build/generated/source/apt/debug])
This is how my build.gradle looks like:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath "io.realm:realm-gradle-plugin:3.2.0"
classpath 'io.fabric.tools:gradle:1.+'
}
}
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://maven.fabric.io/public' }
}
def AAVersion = '4.4.0'
dependencies {
// AndroidAnnotations
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
// Support libraries
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
// Mosby mvp
implementation 'com.hannesdorfmann.mosby3:mvp:3.0.0'
implementation 'com.hannesdorfmann.mosby3:mvp-lce:3.0.0'
implementation 'com.hannesdorfmann.mosby3:mvp-nullobject-presenter:3.0.0'
// Gson
implementation 'com.google.code.gson:gson:2.8.0'
// EventBus
implementation 'org.greenrobot:eventbus:3.0.0'
// YoYo
implementation 'com.daimajia.easing:library:2.0#aar'
implementation 'com.daimajia.androidanimations:library:2.2#aar'
// Glide
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:support-v4:27.1.1'
// Android SpinKit
implementation 'com.github.ybq:Android-SpinKit:1.1.0'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
// OkHTTP
testImplementation 'com.squareup.okhttp3:mockwebserver:3.6.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
// RxJava
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.0.1'
// Expandable Layout
implementation 'com.github.aakira:expandable-layout:1.6.0#aar'
// Apache Common Collections
implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
//Google Analytics
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
testImplementation 'junit:junit:4.12'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.2#aar') {
transitive = true;
}
implementation('com.crashlytics.sdk.android:crashlytics-ndk:1.1.6#aar') {
transitive = true
}
}
android {
compileSdkVersion 27
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "nl.dtt.refcom4all"
minSdkVersion 16
targetSdkVersion 27
versionCode 9
versionName "1.4.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
cppFlags "-fexceptions"
}
}
}
signingConfigs {
release {
keyAlias 'alias here'
keyPassword 'password here'
storeFile file('keystore/release-keystore.jks')
storePassword 'password here'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ext.enableCrashlytics = true
ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/REF-RD-VRANDROID/changelog.txt"
}
debug{
minifyEnabled false
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
ext.enableCrashlytics=true
ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/REF-RD-VRANDROID/changelog.txt"
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs/ts3_sdk_3.0.4/bin/android']
}
}
externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
}
This works perfectly on my machine (running the same, latest version of AS 3.2) but on my build machine, it gets this error. Any ideas what I can do, regarding this?
Is there possible to be a difference in the way AndroidStudio settings are set, that could cause this?
I reverted to using classpath 'com.android.tools.build:gradle:3.1.4' instead of classpath 'com.android.tools.build:gradle:3.2.0' and that worked
I tried to build my android project ( react-native ) and it gives me this error
Failed to resolve: com
And when i click on open the file, it show a line in app build.gradle
apply plugin: "com.android.application"
This is my app gradle file
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: "com.android.application"
apply plugin: 'io.fabric'
//apply plugin: 'com.neenbedankt.android-apt'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
flavorDimensions "default"
defaultConfig {
applicationId "[APPLICATINO ID]"
targetSdkVersion 26
versionCode 8
versionName '1.0.5'
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Deprecated. Used by net.openid:appauth
manifestPlaceholders = [
'appAuthRedirectScheme': 'host.exp.exponent'
]
}
dexOptions {
javaMaxHeapSize System.getenv("DISABLE_DEX_MAX_HEAP") ? null : "8g"
}
productFlavors {
// Define separate dev and prod product flavors.
dev {
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
// to pre-dex each module and produce an APK that can be tested on
// Android Lollipop without time consuming dex merging processes.
minSdkVersion 21
}
devRemoteKernel {
minSdkVersion 21
}
dev19 {
// For debugging / development on older SDK versions. Increases build
// time so use 'dev' if not running on older SDKs.
minSdkVersion 19
}
prod {
// The actual minSdkVersion for the application.
minSdkVersion 19
}
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
signingConfigs {
debug {
storeFile file('../debug.keystore')
}
}
lintOptions {
abortOnError false
}
packagingOptions {
pickFirst "**"
}
}
// Don't use modern jsc-android since it still has some critical bugs that
// crash applications when the string for the JS bundle is loaded and when
// locale-specific date functions are called.
// configurations.all {
// resolutionStrategy {
// force 'org.webkit:android-jsc:r216113'
// }
// }
apply from: 'expo.gradle'
dependencies {
// This should be here already
implementation project(':react-native-firebase')
// Firebase dependencies
implementation "com.google.android.gms:play-services-base:15.0.1"
implementation "com.google.firebase:firebase-core:16.0.1"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:multidex:1.0.1'
// Our dependencies
implementation 'com.android.support:appcompat-v7:27.1.1'
// Our dependencies from ExpoView
// DON'T ADD ANYTHING HERE THAT ISN'T IN EXPOVIEW. ONLY COPY THINGS FROM EXPOVIEW TO HERE.
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.facebook.android:facebook-android-sdk:4.7.0'
implementation('com.facebook.android:audience-network-sdk:4.22.1') {
exclude module: 'play-services-ads'
}
compileOnly 'org.glassfish:javax.annotation:3.1.1'
implementation 'com.jakewharton:butterknife:7.0.1'
implementation 'de.greenrobot:eventbus:2.4.0'
implementation 'com.amplitude:android-sdk:2.9.2' // Be careful when upgrading! Upgrading might break experience scoping. Check with Jesse. See Analytics.resetAmplitudeDatabaseHelper
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.gms:play-services-gcm:12.0.1'
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services-ads:12.0.1'
annotationProcessor 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
implementation "com.raizlabs.android:DBFlow-Core:2.2.1"
implementation "com.raizlabs.android:DBFlow:2.2.1"
implementation "com.madgag.spongycastle:core:1.53.0.0"
implementation "com.madgag.spongycastle:prov:1.53.0.0"
debugImplementation 'com.s quareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
// debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
implementation 'com.facebook.device.yearclass:yearclass:1.0.1'
implementation 'commons-io:commons-io:1.3.2'
implementation 'me.leolin:ShortcutBadger:1.1.4#aar'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.7'
implementation 'com.yqritc:android-scalablevideoview:1.0.1'
implementation 'commons-codec:commons-codec:1.10'
implementation 'com.segment.analytics.android:analytics:4.3.0'
implementation 'com.google.zxing:core:3.2.1'
implementation 'net.openid:appauth:0.4.1'
implementation('com.airbnb.android:lottie:2.5.5') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
implementation 'io.branch.sdk.android:library:2.17.1'
implementation('io.nlopez.smartlocation:library:3.2.11') {
transitive = false
}
implementation 'com.android.support:exifinterface:27.1.1'
implementation 'com.squareup.okhttp3:okhttp:3.4.1'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1'
implementation 'com.squareup.okhttp3:okhttp-ws:3.4.1'
implementation 'com.squareup.okio:okio:1.9.0'
// Testing
// androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
// We use a modified build of com.android.support.test:runner:1.0.1. Explanation in maven-test/README
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support:support-annotations:27.1.1'
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.0'
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
androidTestImplementation 'com.azimolabs.conditionwatcher:conditionwatcher:0.2'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.robolectric:robolectric:3.8'
implementation('host.exp.exponent:expoview:28.0.0#aar') {
transitive = true
}
}
// This has to be down here for some reason
apply plugin: 'com.google.gms.google-services'
And here is my logcat result: https://justpaste.it/60b4o
Try setting http proxy in setting. the fabric library is restricted in some countries like Iran
I'm trying to create a signed APK, but an error will appear at the end:
Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/design/widget/CoordinatorLayout$1.class
apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'
buildscript {
repositories {
maven { url "https://github.com/omadahealth/omada-nexus/raw/master/release" }
maven { url "https://jitpack.io" }
}
dependencies {
}
}
android {
signingConfigs {
config {
}
}
lintOptions {
abortOnError false
}
dataBinding {
enabled = true
}
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.myandroidapp.android"
minSdkVersion 17
targetSdkVersion 27
versionCode 5
versionName "1.3"
multiDexEnabled true
}
buildTypes {
release {
ext.enableCrashlytics = true
//shrinkResources false
//minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//debuggable false
//jniDebuggable false
signingConfig signingConfigs.config
//zipAlignEnabled true
}
debug {
//debuggable true
ext.enableCrashlytics = true
//minifyEnabled false
//shrinkResources false
//renderscriptDebuggable false
//jniDebuggable false
proguardFiles 'proguard-rules.txt'
//signingConfig signingConfigs.debug
}
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/**'
exclude 'META-INF/**'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
mavenCentral()
jcenter()
}
android {
dexOptions {
jumboMode = true
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// Navigation Drawer Library
compile('com.mikepenz:materialdrawer:5.3.0#aar') {
transitive = true
}
//Google, Inc (Play services) Libraries
implementation 'com.google.android.gms:play-services-places:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-ads:11.8.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-crash:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-config:11.8.0'
implementation 'com.google.firebase:firebase-appindexing:11.8.0'
implementation 'com.google.android.gms:play-services-appinvite:11.8.0'
//Google, Inc (Firebase) Libraries
implementation 'com.firebase:firebase-jobdispatcher:0.6.0'
implementation 'com.firebaseui:firebase-ui-database:2.3.0'
implementation 'com.firebase:geofire-android:2.1.2'
// Google, Inc (Support) Libraries
implementation 'com.android.support:support-v13:27.0.2'
//implementation 'com.android.support:customtabs:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.android.support:palette-v7:27.0.2'
implementation 'com.android.support:support-vector-drawable:27.0.2'
//implementation 'com.android.support.constraint:constraint-layout:1.0.2'
// Facebook, Inc SDKs
implementation 'com.facebook.android:facebook-android-sdk:4.29.0'
// Libraries for images
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.lorentzos.swipecards:library:1.0.9'
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
implementation 'com.vanniktech:emoji-twitter:0.5.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
implementation 'com.github.yalantis:ucrop:2.2.1'
implementation 'com.github.jkwiecien:EasyImage:1.3.1'
implementation 'jp.wasabeef:picasso-transformations:2.1.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
// Location Helper Library
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
// Time library
implementation 'joda-time:joda-time:2.9.9'
implementation 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'
// Others
// event bus
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.flipboard:bottomsheet-core:1.5.3'
implementation 'com.flipboard:bottomsheet-commons:1.5.3'
implementation 'com.greysonparrelli.permiso:permiso:0.3.0'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.5.2'
implementation 'com.airbnb.android:lottie:2.2.5'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
apply plugin: 'com.google.gms.google-services'
This may be due to different versions of the support library being used.
Add the following in your build.gradle
configurations.all {
resolutionStrategy {
force 'com.android.support:design:27.0.2'
force 'com.android.support:support-v4:27.0.2'
force 'com.android.support:appcompat-v7:27.0.2'
}
}