kandi background
Explore Kits

Caldroid | A better calendar for Android | Android library

 by   roomorama Java Version: Current License: Non-SPDX

 by   roomorama Java Version: Current License: Non-SPDX

Download this library from

kandi X-RAY | Caldroid Summary

Caldroid is a Java library typically used in Mobile, Android applications. Caldroid has no bugs, it has no vulnerabilities, it has build file available and it has medium support. However Caldroid has a Non-SPDX License. You can download it from GitHub, Maven.
Caldroid is a fragment that display calendar with dates in a month. Caldroid can be used as embedded fragment, or as dialog fragment. User can also swipe left/right to navigate to different months. It’s very easy to customize look and feel of Caldroid using your own theme, thanks to [@crocodile2u](https://github.com/crocodile2u) contribution. There are two default themes in Caldroid (Light and Dark). You can provide your own theme based on these default themes as well. Caldroid is fully localized. You can customize start day of the week for different countries. By default calendar start on Sunday. Caldroid can be used with Android 2.2 and above. It is extracted from [official Roomorama application](https://play.google.com/store/apps/details?id=com.roomorama). <img src="https://raw.github.com/roomorama/Caldroid/master/screenshot/1.png" width="270" style="margin-right:10px;"> <img src="https://raw.github.com/roomorama/Caldroid/master/screenshot/dark.png" width="270">. If you found bugs specific to Caldroid, please open a new issue on Github. However for general Android questions (about layout, drawable, etc), you probably can find more information on StackOverflow.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • Caldroid has a medium active ecosystem.
  • It has 1425 star(s) with 554 fork(s). There are 95 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 115 open issues and 309 have been closed. On average issues are closed in 116 days. There are 16 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of Caldroid is current.
Caldroid Support
Best in #Android
Average in #Android
Caldroid Support
Best in #Android
Average in #Android

quality kandi Quality

  • Caldroid has 0 bugs and 0 code smells.
Caldroid Quality
Best in #Android
Average in #Android
Caldroid Quality
Best in #Android
Average in #Android

securitySecurity

  • Caldroid has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • Caldroid code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
Caldroid Security
Best in #Android
Average in #Android
Caldroid Security
Best in #Android
Average in #Android

license License

  • Caldroid has a Non-SPDX License.
  • Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.
Caldroid License
Best in #Android
Average in #Android
Caldroid License
Best in #Android
Average in #Android

buildReuse

  • Caldroid releases are not available. You will need to build from source code and install.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
Caldroid Reuse
Best in #Android
Average in #Android
Caldroid Reuse
Best in #Android
Average in #Android
Top functions reviewed by kandi - BETA

kandi has reviewed Caldroid and discovered the below as its top functions. This is intended to give you an instant insight into Caldroid implemented functionality, and help decide if they suit your requirements.

  • Called when the activity is created .
    • Retrieve the initial arguments .
      • Get the data at the specified position
        • Gets a list of dates in a given month .
          • Customize the textView for this cell .
            • Override this to measure the width of the view .
              • Override onCreateDrawableState .
                • Setup the grid view .
                  • Returns the count displayed in this chart
                    • Returns a date fragment at a specified position .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      Caldroid Key Features

                      ##Flexible setup: can be embedded or shown as dialog If you support Android 2.2 and above, you can embed caldroid fragment in your activity with below code:. If your app only target minSdkVersion 16 and above, you can use Caldroid too. First, you need to change your Activity class to FragmentActivity, and add support library to your project. You don’t have to change how you use android.app.Fragment. You can also embed caldroid fragment as a child in your fragment.

                      Setup

                      copy iconCopydownload iconDownload
                      &lt;dependency&gt;
                          &lt;groupId&gt;com.roomorama&lt;/groupId&gt;
                          &lt;artifactId&gt;caldroid&lt;/artifactId&gt;
                          &lt;version&gt;3.0.1&lt;/version&gt;
                      &lt;/dependency&gt;

                      Features

                      copy iconCopydownload iconDownload
                      CaldroidFragment caldroidFragment = new CaldroidFragment();
                      Bundle args = new Bundle();
                      Calendar cal = Calendar.getInstance();
                      args.putInt(CaldroidFragment.MONTH, cal.get(Calendar.MONTH) + 1);
                      args.putInt(CaldroidFragment.YEAR, cal.get(Calendar.YEAR));
                      caldroidFragment.setArguments(args);
                      
                      FragmentTransaction t = getSupportFragmentManager().beginTransaction();
                      t.replace(R.id.calendar1, caldroidFragment);
                      t.commit();

                      Custom theme

                      copy iconCopydownload iconDownload
                          &lt;!-- Dark theme. --&gt;
                          &lt;style name="CaldroidDefaultDark" parent="CaldroidDefault"&gt;
                              &lt;item name="styleCaldroidViewLayout"&gt;@style/CaldroidDefaultDarkCalendarViewLayout&lt;/item&gt;
                              &lt;item name="styleCaldroidMonthName"&gt;@style/CaldroidDefaultDarkMonthName&lt;/item&gt;
                              &lt;item name="styleCaldroidNormalCell"&gt;@style/CaldroidDefaultDarkNormalCell&lt;/item&gt;
                              &lt;item name="styleCaldroidSquareCell"&gt;@style/CaldroidDefaultDarkSquareCell&lt;/item&gt;
                              &lt;item name="styleCaldroidGridView"&gt;@style/CaldroidDefaultDarkGridView&lt;/item&gt;
                          &lt;/style&gt;
                      
                          &lt;style name="CaldroidDefaultDarkCalendarViewLayout"&gt;
                              &lt;item name="android:background"&gt;@android:color/black&lt;/item&gt;
                          &lt;/style&gt;
                      
                          &lt;style name="CaldroidDefaultDarkMonthName" parent="CaldroidDefaultMonthName"&gt;
                              &lt;item name="android:textColor"&gt;@color/caldroid_white&lt;/item&gt;
                          &lt;/style&gt;
                      
                          &lt;style name="CaldroidDefaultDarkGridView" parent="CaldroidDefaultGridView"&gt;
                              &lt;item name="android:background"&gt;@color/caldroid_middle_gray&lt;/item&gt;
                          &lt;/style&gt;
                      
                          &lt;style name="CaldroidDefaultDarkCell" parent="CaldroidDefaultCell"&gt;
                              &lt;item name="android:textColor"&gt;@color/cell_text_color_dark&lt;/item&gt;
                              &lt;item name="android:background"&gt;@drawable/cell_bg_dark&lt;/item&gt;
                          &lt;/style&gt;
                      
                          &lt;style name="CaldroidDefaultDarkNormalCell" parent="CaldroidDefaultDarkCell"&gt;
                              &lt;item name="android:padding"&gt;5dp&lt;/item&gt;
                          &lt;/style&gt;
                      
                          &lt;style name="CaldroidDefaultDarkSquareCell" parent="CaldroidDefaultDarkCell" /&gt;

                      Custom backgrounds and text colors for different dates

                      copy iconCopydownload iconDownload
                      // You can use any of below methods to set background colors
                      public void setBackgroundDrawableForDates(HashMap&lt;Date, Drawable&gt; backgroundForDateMap);
                      public void setBackgroundDrawableForDateTimes(HashMap&lt;DateTime, Drawable&gt; backgroundForDateTimeMap);
                      public void setBackgroundDrawableForDate(Drawable drawable, Date date);
                      public void setBackgroundDrawableForDateTime(Drawable drawable, DateTime dateTime);
                      
                      // Below methods is to set text color
                      public void setTextColorForDates(HashMap&lt;Date, Integer&gt; textColorForDateMap);
                      public void setTextColorForDateTimes(HashMap&lt;DateTime, Integer&gt; textColorForDateTimeMap);
                      public void setTextColorForDate(int textColorRes, Date date);
                      public void setTextColorForDateTime(int textColorRes, DateTime dateTime);

                      Set min / max date

                      copy iconCopydownload iconDownload
                      public void setMinDate(Date minDate);
                      public void setMinDateFromString(String minDateString, String dateFormat);
                      
                      public void setMaxDate(Date minDate);
                      public void setMaxDateFromString(String maxDateString, String dateFormat);

                      Set disabled dates

                      copy iconCopydownload iconDownload
                      public void setDisableDates(ArrayList&lt;Date&gt; disableDateList);
                      public void setDisableDatesFromString(ArrayList&lt;String&gt; disableDateStrings);
                      public void setDisableDatesFromString(ArrayList&lt;String&gt; disableDateStrings, String dateFormat);

                      Multidex app still over 64K method limit

                      copy iconCopydownload iconDownload
                      // FHIR
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-android:3.1.0'
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:3.1.0'
                      
                      // FHIR
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-base:3.1.0@jar'
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-utilities:3.1.0@jar'
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:3.1.0@jar'
                      compile 'commons-io:commons-io:2.5'
                      compile 'org.slf4j:slf4j-api:1.7.25@jar'
                      
                      // FHIR
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-android:3.1.0'
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:3.1.0'
                      
                      // FHIR
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-base:3.1.0@jar'
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-utilities:3.1.0@jar'
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:3.1.0@jar'
                      compile 'commons-io:commons-io:2.5'
                      compile 'org.slf4j:slf4j-api:1.7.25@jar'
                      

                      How to fix ''boolean androidx.fragment.app.FragmentManagerImpl.isDestroyed()' on a null object reference' inside fragment with caldroid nested

                      copy iconCopydownload iconDownload
                        implementation 'com.github.vpotvin:caldroidx:1.0'
                      

                      I have trouble with the latest Android Studio Gradle Update 3.3.1

                      copy iconCopydownload iconDownload
                      // Top-level build file where you can add configuration options
                      //common to all sub-projects/modules.
                      buildscript {
                          repositories {
                              // jcenter()
                              google()
                              jcenter {
                                  url "http://jcenter.bintray.com"
                              }
                              maven { url 'https://maven.fabric.io/public' }
                          }
                      
                          dependencies {
                              classpath 'com.android.tools.build:gradle:3.3.1'
                              classpath "io.realm:realm-gradle-plugin:4.1.1"
                              classpath 'com.google.gms:google-services:4.2.0'
                              classpath 'io.fabric.tools:gradle:1.27.1'
                          }
                          //due to google services older version, and crashlytics latest version:
                      //        WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
                      //                It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
                      //        Affected Modules: app
                          // NOTE: Do not place your application dependencies here; they belong
                          // in the individual module build.gradle files
                      }
                      

                      Android Gradle Sync failed could not find support-core-ui.aar

                      copy iconCopydownload iconDownload
                      implementation "com.android.support:support-core-utils:27.1.1"
                      
                      allprojects {
                        repositories {
                          google()
                          jcenter()
                        }
                      }
                      
                          jcenter()
                          google()
                      
                          google()
                          jcenter()
                      
                          jcenter()
                          google()
                      
                          google()
                          jcenter()
                      
                      buildscript {
                          repositories {
                              jcenter()
                              google()
                              mavenLocal()
                              maven { url 'https://maven.google.com'  }
                          }
                      }
                      
                      allprojects {
                          repositories {
                              jcenter()
                              google()
                              mavenLocal()
                              maven { url 'https://maven.google.com'  }
                          }
                      }
                      
                      buildscript.repositories {
                          google()
                          jcenter()
                          ...
                      }
                      allprojects.repositories {
                          google()
                          jcenter()
                          ...
                      }
                      

                      java.util.zip.ZipException: duplicate entry: n.class

                      copy iconCopydownload iconDownload
                      configurations {
                          all*.exclude group: 'com.android.support', module: 'support-v4'
                      }
                      

                      Android TransformException: ZipException duplicate entry in CoordinatorLayout.class

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

                      Unable to merge dex with androidTestImplementation

                      copy iconCopydownload iconDownload
                      +--- com.google.android:android-test:4.1.1.4
                      |    +--- com.google.android:android:4.1.1.4
                      |    |    +--- commons-logging:commons-logging:1.1.1
                      |    |    +--- org.apache.httpcomponents:httpclient:4.0.1
                      |    |    |    +--- org.apache.httpcomponents:httpcore:4.0.1
                      |    |    |    +--- commons-logging:commons-logging:1.1.1
                      |    |    |    \--- commons-codec:commons-codec:1.3
                      |    |    +--- org.khronos:opengl-api:gl1.1-android-2.1_r1
                      |    |    +--- xerces:xmlParserAPIs:2.6.2
                      |    |    +--- xpp3:xpp3:1.1.4c
                      
                       androidTestImplementation('com.google.android:android-test:4.1.1.4'){
                                  exclude group: 'xpp3'
                              }
                      
                      +--- com.google.android:android-test:4.1.1.4
                      |    +--- com.google.android:android:4.1.1.4
                      |    |    +--- commons-logging:commons-logging:1.1.1
                      |    |    +--- org.apache.httpcomponents:httpclient:4.0.1
                      |    |    |    +--- org.apache.httpcomponents:httpcore:4.0.1
                      |    |    |    +--- commons-logging:commons-logging:1.1.1
                      |    |    |    \--- commons-codec:commons-codec:1.3
                      |    |    +--- org.khronos:opengl-api:gl1.1-android-2.1_r1
                      |    |    +--- xerces:xmlParserAPIs:2.6.2
                      |    |    +--- xpp3:xpp3:1.1.4c
                      
                       androidTestImplementation('com.google.android:android-test:4.1.1.4'){
                                  exclude group: 'xpp3'
                              }
                      

                      Getting Error while running code, I tried MultidexEnable but didnt work

                      copy iconCopydownload iconDownload
                      compile 'com.squareup.retrofit2:retrofit:2.3.0'
                      compile 'org.apache.commons:commons-lang3:3.5'
                      
                      android {
                      
                      ...
                      
                      
                          packagingOptions {
                                 exclude  'org/apache/http/annotation/NotThreadSafe.class'
                          }
                      }
                      
                      compile 'com.squareup.retrofit2:retrofit:2.3.0'
                      compile 'org.apache.commons:commons-lang3:3.5'
                      
                      android {
                      
                      ...
                      
                      
                          packagingOptions {
                                 exclude  'org/apache/http/annotation/NotThreadSafe.class'
                          }
                      }
                      
                      buildscript {
                          repositories {
                              mavenCentral()
                              jcenter()
                              google()
                          }
                          dependencies {
                              classpath 'com.android.tools.build:gradle:3.0.0'
                              // NOTE: Do not place your application dependencies here; they belong
                              // in the individual module build.gradle files
                          }
                      }
                      
                      allprojects {
                          repositories {
                              mavenCentral()
                              jcenter()
                              google()
                          }
                      }
                      
                      task clean(type: Delete) {
                          delete rootProject.buildDir
                      }
                      
                      distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip
                      
                      buildscript {
                          repositories {
                              mavenCentral()
                              jcenter()
                              google()
                          }
                          dependencies {
                              classpath 'com.android.tools.build:gradle:3.0.0'
                              // NOTE: Do not place your application dependencies here; they belong
                              // in the individual module build.gradle files
                          }
                      }
                      
                      allprojects {
                          repositories {
                              mavenCentral()
                              jcenter()
                              google()
                          }
                      }
                      
                      task clean(type: Delete) {
                          delete rootProject.buildDir
                      }
                      
                      distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip
                      

                      Caldroid calendar unparsable date exception

                      copy iconCopydownload iconDownload
                      final SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
                      final CaldroidListener caldroidListener = new CaldroidListener() {
                                  @Override
                                  public void onSelectDate(Date date, View view) {
                                      eventDate.setText(sdf.format(date));
                      
                                  }
                              };
                      

                      Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease' [Error]

                      copy iconCopydownload iconDownload
                      compile('id.zelory:compressor:1.0.4') {
                          exclude group: 'io.reactivex', module: 'rxjava'
                      }
                      

                      Community Discussions

                      Trending Discussions on Caldroid
                      • Multidex app still over 64K method limit
                      • How to fix ''boolean androidx.fragment.app.FragmentManagerImpl.isDestroyed()' on a null object reference' inside fragment with caldroid nested
                      • I have trouble with the latest Android Studio Gradle Update 3.3.1
                      • Android Gradle Sync failed could not find support-core-ui.aar
                      • java.util.zip.ZipException: duplicate entry: n.class
                      • Android TransformException: ZipException duplicate entry in CoordinatorLayout.class
                      • Unable to merge dex with androidTestImplementation
                      • Getting Error while running code, I tried MultidexEnable but didnt work
                      • Android (Xamarin) binding project for Android Studio library
                      • Caldroid calendar unparsable date exception
                      Trending Discussions on Caldroid

                      QUESTION

                      Multidex app still over 64K method limit

                      Asked 2020-Jan-16 at 10:30

                      I'm facing a weird issue with multidex. I've had my app multidexed for a long time, but lately I can't build it anymore. It started after configuring Kotlin in the project.

                      The 'run' option in Android Studio works: the app runs successfully in my device. However, if I try the "Build APK" option or run gradlew assembleDebug, the build fails with the usual exception:

                      Error:The number of method references in a .dex file cannot exceed 64K.
                      Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
                      Error:com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
                      

                      However, multidex worked correctly before adding Kotlin. I can checkout the commit just before adding Kotlin, build the apk and check there's 3 .dex files, with a method count over 100k total.

                      Some key details:

                      • Gradle 4.1, with Gradle plugin 3.0.1
                      • Build-tools version 26.0.2
                      • Kotlin version 1.2.0

                      After proguarding, the app does not need multidex, but I don't really want to proguard for debug compilation, and besides, this should be working.

                      Here's the complete build.gradle script:

                      buildscript {
                          repositories {
                              mavenCentral()
                          }
                      }
                      apply plugin: 'com.android.application'
                      apply plugin: 'kotlin-android'
                      apply plugin: 'idea'
                      
                      
                      
                      repositories {
                          mavenCentral()
                          jcenter()
                          maven { url "https://maven.google.com" }
                          maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
                          maven { url 'https://jitpack.io' }
                      }
                      
                      idea {
                          module {
                              downloadJavadoc = true
                              downloadSources = true
                          }
                      }
                      
                      // read keystore for app signing
                      def keystorePropertiesFile = rootProject.file("keystore.properties")
                      def keystoreProperties = null
                      if (keystorePropertiesFile.exists()) {
                          keystoreProperties = new Properties()
                          keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
                      }
                      
                      
                      def getDate() {
                          def date = new Date()
                          def formattedDate = date.format('yyyy.MM.dd')
                          return formattedDate
                      }
                      
                      def getCustomProguardFiles() {
                          return fileTree(dir: "proguard", include: ["*.pro"]).asList().toArray()
                      }
                      
                      android {
                          compileSdkVersion 25
                          buildToolsVersion '26.0.2'
                          defaultConfig {
                              minSdkVersion 16
                              targetSdkVersion 25
                              versionCode 1
                              versionName "1.0"
                              testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
                              applicationId "my.app.id"
                              multiDexEnabled true
                      
                              manifestPlaceholders = [
                                      'appAuthRedirectScheme': 'my.app.id'
                              ]
                      
                              //TODO do not put this into release
                              resValue "string", "google_client_id", google_appId + ".apps.googleusercontent.com"
                              resValue "string", "google_auth_redirect_uri", "com.googleusercontent.apps." + google_appId + ":/oauth2redirect"
                          }
                      
                          dexOptions {
                      
                          }
                      
                          dexOptions {
                              javaMaxHeapSize "2g"
                          }
                      
                          packagingOptions {
                              exclude 'META-INF/DEPENDENCIES'
                              exclude 'META-INF/NOTICE'
                              exclude 'META-INF/LICENSE'
                              exclude 'META-INF/LICENSE.txt'
                              exclude 'META-INF/NOTICE.txt'
                          }
                      
                          signingConfigs {
                              release {
                                  keyAlias keystoreProperties != null ? keystoreProperties['keyAlias'] : null
                                  keyPassword keystoreProperties != null ? keystoreProperties['keyPassword'] : null
                                  storeFile keystoreProperties != null ? file(keystoreProperties['storeFile']) : null
                                  storePassword keystoreProperties != null ? keystoreProperties['storePassword'] : null
                              }
                          }
                      
                      
                          lintOptions {
                              abortOnError false
                              checkReleaseBuilds false
                          }
                          buildTypes {
                              release {
                                  minifyEnabled true
                                  proguardFiles getDefaultProguardFile('proguard-android.txt')
                                  proguardFiles getCustomProguardFiles()
                                  testProguardFiles getDefaultProguardFile('proguard-android.txt')
                                  testProguardFiles getCustomProguardFiles()
                                  signingConfig signingConfigs.release
                              }
                              debug {
                                  debuggable true
                                  minifyEnabled false
                              }
                          }
                      
                          flavorDimensions "buildType"
                      
                          productFlavors {
                              develop {
                                  applicationIdSuffix ""
                                  dimension "buildType"
                              }
                              product {
                                  dimension "buildType"
                              }
                              ci {
                                  dimension "buildType"
                              }
                          }
                      
                          applicationVariants.all { variant ->
                              variant.outputs.all {
                                  outputFileName = "${variant.name}-${variant.versionName}.apk"
                              }
                          }
                          compileOptions.incremental = false
                      }
                      
                      dependencies {
                      
                          /********** DEBUGGING **********/
                          // Chrome debug bridge
                          compile 'com.facebook.stetho:stetho:1.5.0'
                          compile 'com.facebook.stetho:stetho-okhttp3:1.5.0'
                      
                          // Memory leak debugging
                          //  1.5.2 held back because of a bug with gradle 3.0
                          debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
                          releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
                          testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
                          androidTestCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
                      
                      
                          /********** SUPPORT **********/
                          // Multidex support
                          compile 'com.android.support:multidex:1.0.2'
                      
                          // Support libs
                          compile "com.android.support:appcompat-v7:$libVersions.android.support"
                          compile "com.android.support:cardview-v7:$libVersions.android.support"
                          compile "com.android.support:customtabs:$libVersions.android.support"
                          compile "com.android.support:design:$libVersions.android.support"
                          compile "com.android.support:gridlayout-v7:$libVersions.android.support"
                          compile "com.android.support:palette-v7:$libVersions.android.support"
                          compile "com.android.support:preference-v7:$libVersions.android.support"
                          compile "com.android.support:recyclerview-v7:$libVersions.android.support"
                          compile "com.android.support:support-annotations:$libVersions.android.support"
                          compile "com.android.support:support-v4:$libVersions.android.support"
                          compile "com.android.support:support-v13:$libVersions.android.support"
                      
                          // Testing dependencies
                          //  Made explicit to avoid conflicts with other testing libs
                          androidTestCompile "com.android.support:appcompat-v7:$libVersions.android.support"
                          androidTestCompile "com.android.support:design:$libVersions.android.support"
                          androidTestCompile "com.android.support:recyclerview-v7:$libVersions.android.support"
                          androidTestCompile "com.android.support:support-annotations:$libVersions.android.support"
                          androidTestCompile "com.android.support:support-v4:$libVersions.android.support"
                      
                      
                          /********** TESTING **********/
                          // JUnit
                          testCompile 'junit:junit:4.12'
                      
                          // Mockito
                          testCompile "org.mockito:mockito-core:2.8.47"
                      
                          // Support testing
                          androidTestCompile 'com.android.support.test.espresso:espresso-contrib:3.0.0'
                          androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.0'
                          androidTestCompile 'com.android.support.test:rules:1.0.0'
                          androidTestCompile 'com.android.support.test:runner:1.0.0'
                      
                      
                          /********** UTILITIES **********/
                          // HTML parsing
                          compile 'org.jsoup:jsoup:1.10.2'
                      
                          // Event bus
                          compile 'org.greenrobot:eventbus:3.0.0'
                      
                          // FHIR
                          compile 'ca.uhn.hapi.fhir:hapi-fhir-android:3.1.0'
                          compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:3.1.0'
                      
                          // Jobs
                          compile 'com.evernote:android-job:1.1.11'
                      
                          // JSON serializing-deserializing
                          compile 'com.google.code.gson:gson:2.8.1'
                      
                          // JWT validation
                          compile 'com.nimbusds:nimbus-jose-jwt:4.41.1'
                      
                          // Lang utilities
                          //  Used for Levenshtein distance, etc
                          compile 'org.apache.commons:commons-lang3:3.6'
                          compile 'org.apache.commons:commons-text:1.1'
                      
                          // OpenID authentication
                          compile 'net.openid:appauth:0.7.0'
                      
                          // QR code scanning
                          compile 'com.google.zxing:core:3.3.0'
                          compile 'com.journeyapps:zxing-android-embedded:3.5.0@aar'
                      
                          // Play Services (for Firebase InstanceID)
                          compile 'com.google.android.gms:play-services-auth:11.6.0'
                      
                          // Recurrence processing
                          compile 'org.dmfs:lib-recur:0.10'
                      
                          // REST services
                          compile 'com.squareup.retrofit2:retrofit:2.3.0'
                          compile 'com.squareup.retrofit2:converter-scalars:2.1.0'
                      
                          // SQLite ORM
                          compile 'com.j256.ormlite:ormlite-android:5.0'
                      
                          // Time and date handling
                          compile 'com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:1.6.0'
                          compile 'joda-time:joda-time:2.9.7'
                      
                          // View/resource binding
                          annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
                          compile 'com.jakewharton:butterknife:8.8.1'
                      
                      
                          /********** VIEWS AND VIEW UTILITIES **********/
                          // About page with libraries
                          compile('com.mikepenz:aboutlibraries:5.2.5@aar') {
                              transitive = true
                          }
                      
                          // Calendar views
                          compile 'com.roomorama:caldroid:3.0.1'
                          compile 'com.squareup:android-times-square:1.6.4@aar'
                      
                          // Circular progress "pie" view
                          //  Used for pill picker
                          compile 'com.github.filippudak.progresspieview:library:1.0.4'
                      
                          // Dialogs with material style
                          compile 'com.github.javiersantos:MaterialStyledDialogs:2.0'
                      
                          // Floating Action Button
                          compile 'com.getbase:floatingactionbutton:1.9.0'
                      
                          // GIF ImageView
                          compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.3'
                      
                          // Icons
                          compile 'com.mikepenz:community-material-typeface:1.9.32.2@aar'
                          compile 'com.mikepenz:google-material-typeface:2.1.2.1@aar'
                          compile 'com.mikepenz:iconics-core:2.7.1@aar'
                      
                          // Image loading
                          compile 'com.squareup.picasso:picasso:2.5.2'
                      
                          // Intro slides
                          compile 'com.heinrichreimersoftware:material-intro:1.5.8'
                      
                          // Material style utilities
                          compile('com.mikepenz:materialize:0.2.7@aar') {
                              transitive = true
                          }
                      
                          // Picker DialogFragments
                          compile 'com.code-troopers.betterpickers:library:3.1.0'
                      
                          // Round image view
                          compile 'com.makeramen:roundedimageview:1.5.0'
                      
                          // Tab strip
                          compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
                      
                          // Sliding left drawer
                          compile('com.mikepenz:materialdrawer:4.4.1@aar') {
                              transitive = true
                          }
                      
                          // Recyclerview adapters
                          compile('com.mikepenz:fastadapter:2.1.5@aar') {
                              transitive = true
                          }
                          compile 'com.mikepenz:fastadapter-commons:2.1.0@aar'
                          compile 'com.mikepenz:fastadapter-extensions:2.1.0@aar'
                          compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
                      
                          // Schedule step-by-step building
                          compile 'com.stepstone.stepper:material-stepper:3.3.0'
                          compile 'com.wdullaer:materialdatetimepicker:3.2.2'
                          compile 'com.shawnlin:number-picker:2.4.4'
                      }
                      
                      apply plugin: 'com.google.gms.google-services'
                      

                      And the build.gradle of the project:

                      // Top-level build file where you can add configuration options common to all sub-projects/modules.
                      buildscript {
                          ext.kotlin_version = '1.2.0'
                          repositories {
                              jcenter()
                              maven { url "https://maven.google.com" }
                          }
                          dependencies {
                              classpath 'com.android.tools.build:gradle:3.0.1'
                              classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
                              classpath 'com.google.gms:google-services:3.0.0'
                          }
                          ext {
                              libVersions = [
                                      android: [
                                              support: '25.4.0'
                                      ]
                              ]
                          }
                      }
                      

                      ANSWER

                      Answered 2017-Dec-19 at 15:52

                      It turned out to be a problem with the way I was including HAPI-FHIR. It's a really big library with tons of dependencies, and it probably was collapsing the main dexfile.

                      In the end, I solved it by replacing:

                      // FHIR
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-android:3.1.0'
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:3.1.0'
                      

                      with:

                      // FHIR
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-base:3.1.0@jar'
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-utilities:3.1.0@jar'
                      compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:3.1.0@jar'
                      compile 'commons-io:commons-io:2.5'
                      compile 'org.slf4j:slf4j-api:1.7.25@jar'
                      

                      commons-io and slf4j are runtime dependencies of HAPI, and when using @jar those dependencies aren't downloaded, so they need to be explicitly declared.

                      Note: this particular configuration is only valid for my use case, as HAPI has more runtime dependencies, which would need to be added manually as well in case they're needed.

                      Source https://stackoverflow.com/questions/47814828

                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                      Vulnerabilities

                      No vulnerabilities reported

                      Install Caldroid

                      For Android Studio user: add compile 'com.roomorama:caldroid:3.0.1' to your gradle build file. For Eclipse/ADT user: please see tag [eclipse_project](https://github.com/roomorama/Caldroid/releases/tag/eclipse_project), download the source codes, check out the CaldroidSample to see how the library works. However you are strongly recommended to use Maven or gradle, because this tag is no longer supported. To use in your project, reference the child library project as a library. If you see JAR mismatched error, replace your android-support-v4.jar to the jar inside Caldroid. Make sure you compile the project against Android 4.2 and above to allow nested fragment. See more at http://developer.android.com/about/versions/android-4.2.html#NestedFragments.

                      Support

                      For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

                      DOWNLOAD this Library from

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Explore Related Topics

                      Share this Page

                      share link
                      Consider Popular Android Libraries
                      Try Top Libraries by roomorama
                      Compare Android Libraries with Highest Support
                      Compare Android Libraries with Highest Quality
                      Compare Android Libraries with Highest Security
                      Compare Android Libraries with Permissive License
                      Compare Android Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.