kandi background
Explore Kits

hamcrest-date | Java library which provides a suite hamcrest matchers | Date Time Utils library

 by   eXparity Java Version: Current License: BSD-3-Clause

 by   eXparity Java Version: Current License: BSD-3-Clause

Download this library from

kandi X-RAY | hamcrest-date Summary

hamcrest-date is a Java library typically used in Utilities, Date Time Utils applications. hamcrest-date has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. However hamcrest-date has 3 bugs. You can download it from GitHub.
Hamcrest Date [![Build Status](https://travis-ci.org/eXparity/hamcrest-date.svg?branch=master)](https://travis-ci.org/eXparity/hamcrest-date) [![Coverage Status](https://coveralls.io/repos/eXparity/hamcrest-date/badge.png?branch=master)](https://coveralls.io/r/eXparity/hamcrest-date?branch=master).
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • hamcrest-date has a low active ecosystem.
  • It has 68 star(s) with 8 fork(s). There are 10 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 2 open issues and 27 have been closed. On average issues are closed in 65 days. There are 1 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of hamcrest-date is current.
hamcrest-date Support
Best in #Date Time Utils
Average in #Date Time Utils
hamcrest-date Support
Best in #Date Time Utils
Average in #Date Time Utils

quality kandi Quality

  • hamcrest-date has 3 bugs (0 blocker, 0 critical, 3 major, 0 minor) and 504 code smells.
hamcrest-date Quality
Best in #Date Time Utils
Average in #Date Time Utils
hamcrest-date Quality
Best in #Date Time Utils
Average in #Date Time Utils

securitySecurity

  • hamcrest-date has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • hamcrest-date code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
hamcrest-date Security
Best in #Date Time Utils
Average in #Date Time Utils
hamcrest-date Security
Best in #Date Time Utils
Average in #Date Time Utils

license License

  • hamcrest-date is licensed under the BSD-3-Clause License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
hamcrest-date License
Best in #Date Time Utils
Average in #Date Time Utils
hamcrest-date License
Best in #Date Time Utils
Average in #Date Time Utils

buildReuse

  • hamcrest-date releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • hamcrest-date saves you 4864 person hours of effort in developing the same functionality from scratch.
  • It has 11352 lines of code, 2286 functions and 93 files.
  • It has high code complexity. Code complexity directly impacts maintainability of the code.
hamcrest-date Reuse
Best in #Date Time Utils
Average in #Date Time Utils
hamcrest-date Reuse
Best in #Date Time Utils
Average in #Date Time Utils
Top functions reviewed by kandi - BETA

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

  • Convert the given TimeUnit to its equivalent .
  • Returns a temporal matcher that matches the specified period .
  • Matches a date - time interval .
  • Checks if the date has the expected value .
  • Returns a relative day month year
  • Compares this month to another month .
  • cast Date to LocalDate
  • Convert java date to java . Date
  • Returns true if this interval is longer than the specified interval .
  • Returns a hash code .

hamcrest-date Key Features

A Java library which provides a suite hamcrest matchers for matching dates, times, and moments in time

default

copy iconCopydownload iconDownload
Hamcrest Date is an extension library for the [Java Hamcrest][] matcher library which provides Matcher implementations for Java date types including LocalDate, LocalTime, LocalDateTime, ZonedDateTime, and Date.

Downloads
---------
You can obtain Hamcrest Date binaries from [maven central][]. To include in your project:

A maven project

```xml
<dependency>
    <groupId>org.exparity</groupId>
    <artifactId>hamcrest-date</artifactId>
    <version>2.0.7</version>
</dependency>
```

Versions 2.x.x onwards require Java 8. If you are using an earlier version of Java 8 then include version

```xml
<dependency>
    <groupId>org.exparity</groupId>
    <artifactId>hamcrest-date</artifactId>
    <version>1.1.0</version>
</dependency>
```

Binaries
--------
Hamcrest Date has a single binary, `hamcrest-date.jar`, which contains all the date matchers. Sources and JavaDoc jars are available.

Usage
-------------

The matchers are exposed as static methods on the LocalDateMatchers, LocalTimeMatchers, LocalDateTimeMatchers, ZonedDateTimeMatchers, OffsetDateTimeMatchers, SqlDateMatchers and DateMatchers class.

Units of time are imported from the `ChronoUnit` class:

```java
import static java.time.temporal.ChronoUnit.*;
```

Each matcher can be imported statically (preferred) or normally:
```java
// static, makes sameDay, within, etc available
import static org.exparity.hamcrest.date.LocalDateMatchers.*;
// non-static, must use qualified LocalDateMatchers.sameDay, etc.
import org.exparity.hamcrest.date.LocalDateMatchers;
```

For example, with non-static imports:

```java
LocalDate today = LocalDate.now(); myBirthday = LocalDate.of(2015, AUGUST, 9);
MatcherAssert.assertThat(today, LocalDateMatchers.sameDay(myBirthday));
```

or to test if you're getting closer to your birthday:

```java
LocalDate today = LocalDate.now(); myBirthday = LocalDate.of(2015, AUGUST, 9);
MatcherAssert.assertThat(today, LocalDateMatchers.within(1, ChronoUnit.DAY, myBirthday));
```

or with static importing:

```java
LocalDate today = LocalDate.now(); myBirthday = LocalDate.of(2015, AUGUST, 9);
assertThat(today, within(1, DAY, myBirthday));
```

The same matchers are available for all date types so to match LocalDateTime values:

```java
LocalDateTime myAppointment = LocalDateTime.of(2015, AUGUST, 9, 10, 30, 0);
assertThat(LocalDateTime.now(), within(15, MINUTES, myAppointment));
```

or to match ZonedDateTime values:

```java
ZonedDateTime myAppointment = ZonedDateTime.of(LocalDateTime.of(2015, AUGUST, 9, 10, 30, 0), ZoneId.of("UTC"));
assertThat(ZonedDateTime.now(), within(15, MINUTES, myAppointment));
```

or to match OffsetDateTime values:

```java
OffsetDateTime myAppointment = OffsetDateTime.of(LocalDateTime.of(2015, AUGUST, 9, 10, 30, 0), ZoneOffset.UTC);
assertThat(OffsetDateTime.now(), within(15, MINUTES, myAppointment));
```

or to match LocalTime values:

```java
LocalTime myAppointment = LocalTime.NOON;
assertThat(LocalTime.now(), within(15, MINUTES, myAppointment));
```

or to match java.sql.Date values:

```java
java.sql.Date myAppointment = java.sql.Date.valueOf(LocalDate.of(2015, AUGUST, 9);
assertThat(new java.sql.Date(), within(15, MINUTES, myAppointment));
```

The library includes date matchers for:

* __after__ - Test if the actual date is after the reference date
* __before__ - Test if the actual date is before the reference date
* __within__ - Test if the actual date is within a given period (before or after) of the reference date
* __sameDay__ - Test if the actual date is on the same day as the reference date
* __sameHourOfDay__ - Test if the actual date is on the same hour of the day as the reference date
* __sameInstant__ - Test if the actual date at the same instance as the reference date
* __sameOrBefore__ - Test if the actual date is the same or before the reference date
* __sameOrAfter__ - Test if the actual date is the same or after the reference date
* __sameMinuteOfHour__ - Test if the actual date is on the same minute of the hour as the reference date
* __sameMonthOfYear__ - Test if the actual date is on the same month of the year as the reference date
* __sameSecondOfMinute__ - Test if the actual date is on the same second of the minute as the reference date
* __sameDayOfWeek__ - Test if the actual date is on the same week day as the reference date
* __sameYear__ - Test if the actual date is on the same year as the reference date
* __isInstance__ - Test if the actual date is at the exact instant
* __isSecond__ - Test if the actual date is on the given second
* __isMinute__ - Test if the actual date is on the given minute
* __isHour__ - Test if the actual date is on the given hour
* __isDayOfWeek__ - Test if the actual date is on the given day of the week
* __isDayOfMonth__ - Test if the actual date is on the given day of the month
* __isMonth__ - Test if the actual date is on the given month
* __isYear__ - Test if the actual date is on the given year
* __isYesterday__ - Test if the actual date is yesterday
* __isToday__ - Test if the actual date is today
* __isTomorrow__ - Test if the actual date is tomorrow
* __isMonday__ - Test if the actual date is on a monday
* __isTuesday__ - Test if the actual date is on a tuesday
* __isWednesday__ - Test if the actual date is on a wednesday
* __isThursday__ - Test if the actual date is on a thursday
* __isFriday__ - Test if the actual date is on a friday
* __isSaturday__ - Test if the actual date is on a saturday
* __isSunday__ - Test if the actual date is on a sunday
* __isWeekday__ - Test if the actual date is on a weekday
* __isWeekend__ - Test if the actual date is on a weekend
* __isJanuary__ - Test if the actual date is in january
* __isFebruary__ - Test if the actual date is in february
* __isMarch__ - Test if the actual date is in march
* __isApril__ - Test if the actual date is in april
* __isMay__ - Test if the actual date is in may
* __isJune__ - Test if the actual date is in june
* __isJuly__ - Test if the actual date is in july
* __isAugust__ - Test if the actual date is in august
* __isSeptember__ - Test if the actual date is in september
* __isOctober__ - Test if the actual date is in october
* __isNovember__ - Test if the actual date is in november
* __isDecember__ - Test if the actual date is in december
* __isLeapYear__ - Test if the actual date is on a leap year

The Javadocs include examples on all methods so you can look there for examples for specific methods

Source
------
The source is structured along the lines of the maven standard folder structure for a jar project.

  * Core classes [src/main/java]
  * Unit tests [src/test/java]

The source includes a pom.xml for building with Maven

Release Notes
-------------
Changes 2.0.6 -> 2.0.7
  * Fix Issue 26 - Use licence consistently in release jar files
  * Fix Issue 32 - Fix assertion errors for temporals with timezones

Changes 2.0.5 -> 2.0.6
  * Fix Issue 21 - Add support for changing Locale
  * Fix Issue 24 - Add OffsetDateTimeMatchers
  * Fix Issue 27 - (UnsupportedOperationException with java.sql.Date)
  * Handle java.sql.Date in DateMatchers
  * Add SqlDateMatchers

Changes 2.0.4 -> 2.0.5
  * Fix Issue 20 - (DateMatchers.isDay(int, Month, int) not adapted for non-zero time zones)
  * Support for time zones in temporal fields matchers

Changes 2.0.3 -> 2.0.4
  * Fix Issue 18 - Add test scope to testng

Changes 2.0.2 -> 2.0.3
  * Fix Issue 16 - Incorrect assertion message for before
  * Fix Issue 17 - AM/PM Indicator missing in assertion message

Changes 2.0.1 -> 2.0.2
  * Add Support for LocalTime

Changes 1.1.0 -> 2.0.0
  * Add Support for Java 8 date types.
  * Add new is{*} matchers
  * Move matcher classes to .core package

Changes 1.0.1 -> 1.1
  * Remove deprecated uk.co.it.modular.hamcrest.date.DateMatchers.

Changes 1.0.0 -> 1.0.1
  * Restore and deprecate uk.co.it.modular.hamcrest.date.DateMatchers for backwards compatibility with previous package structure.

Changes 0.9.5 -> 1.0.0
  * Package change to new organisation org.exparity from uk.co.it.modular
  * Fixup flaky tests by using local timezone in non-timezone tests

Acknowledgements
----------------
Developers:
  * Stewart Bissett

Thanks to the developers at [Java Hamcrest][]. Without their hardwork and core libraries there'd be nothing to be extend and we be stuck with old school, non-declarative, non-reusable, assertions.

[BSD License]: http://opensource.org/licenses/BSD-3-Clause
[Maven central]: http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22hamcrest-date%22
[Java Hamcrest]: http://github.com/hamcrest/JavaHamcrest

Android Support plugin errors after upgrading Android Studio to 3.1.0

copy iconCopydownload iconDownload
Android Studio 3.2 Canary 10 Build #AI-181.2784.17.32.4705630, built on April 7, 2018
JRE: 1.8.0_152-release-1136-b01 amd64 
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.13.0-38-generic

Community Discussions

Trending Discussions on hamcrest-date
  • Android Support plugin errors after upgrading Android Studio to 3.1.0
  • Application context load breaks down when adding a single dependency to POM
Trending Discussions on hamcrest-date

QUESTION

Android Support plugin errors after upgrading Android Studio to 3.1.0

Asked 2018-Apr-12 at 09:52

I use Kotlin and databinding for my project, after recent upgrade to Android Studio 3.1.0 I constantly see a lot of exceptions in Android Support plugin:

Could not initialize class android.databinding.tool.ext.ExtKt java.lang.NoClassDefFoundError: Could not initialize class android.databinding.tool.ext.ExtKt at android.databinding.tool.reflection.ModelClass.getTypeName(ModelClass.java:688) at android.databinding.tool.reflection.ModelClass.equals(ModelClass.java:694) at android.databinding.tool.reflection.ModelClass.findSetter(ModelClass.java:614) at android.databinding.tool.reflection.ModelClass.findGetterOrField(ModelClass.java:523) at com.android.tools.idea.lang.databinding.DataBindingXmlReferenceContributor$2.getReferencesByElement(DataBindingXmlReferenceContributor.java:196) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:135) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:123) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:102) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:59) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:53) at com.android.tools.idea.lang.databinding.DataBindingPsiElement.getReferences(DataBindingPsiElement.java:32) at org.intellij.plugins.intelliLang.references.InjectedReferencesContributor.getInjectedReferences(InjectedReferencesContributor.java:56) at org.intellij.plugins.intelliLang.references.InjectedReferencesInspection$1.visitElement(InjectedReferencesInspection.java:40) at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274) at com.android.tools.idea.lang.databinding.psi.impl.PsiDbExprImpl.accept(PsiDbExprImpl.java:43) at com.android.tools.idea.lang.databinding.psi.impl.PsiDbRefExprImpl.accept(PsiDbRefExprImpl.java:42) at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:82) at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:70) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.doInspectInjectedPsi(LocalInspectionsPass.java:750) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$inspectInjectedPsi$6(LocalInspectionsPass.java:338) at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133) at com.intellij.concurrency.ApplierCompleter.tryToExecAllList(ApplierCompleter.java:223) at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:151) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1125) at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94) at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116) at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229) at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96) at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.pollAndExecCC(ForkJoinPool.java:1190) at java.util.concurrent.ForkJoinPool.helpComplete(ForkJoinPool.java:1879) at java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:2045) at java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:390) at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:719) at java.util.concurrent.ForkJoinPool.invoke(ForkJoinPool.java:2616) at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:65) at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:57) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspectInjectedPsi(LocalInspectionsPass.java:341) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:231) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:136) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:83) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:437) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1130) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:430) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:429) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:405) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

My main build.gradle

buildscript {
    ext.kotlin_version = '1.2.31'
    ext.protobuf_version = '3.0.0'
    ext.anko_version='0.10.4'

    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.5'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Application build.gradle

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'project-report'

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "com.myapp"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    dataBinding {
        enabled = true
    }
}

kapt {
    useBuildCache = true
    mapDiagnosticLocations = true
}

dependencies {
    implementation project(':proto')

    implementation "android.arch.persistence.room:runtime:1.0.0"
    implementation 'com.android.support:recyclerview-v7:27.1.0'
    kapt "android.arch.persistence.room:compiler:1.0.0"
    kapt "com.android.databinding:compiler:3.1.0"

    implementation "android.arch.lifecycle:extensions:1.1.1"
    implementation "android.arch.lifecycle:common-java8:1.1.1"

    implementation 'com.auth0.android:jwtdecode:1.1.1'
    implementation 'com.squareup.okhttp3:okhttp:3.9.1'

    // Anko
    implementation "org.jetbrains.anko:anko-sdk15:$anko_version"
    implementation "org.jetbrains.anko:anko-appcompat-v7:$anko_version"

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:support-v4:27.1.0'
    implementation 'com.android.support:support-vector-drawable:27.1.0'

    testImplementation 'junit:junit:4.12'

    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    //noinspection GradleDependency
    androidTestImplementation 'org.exparity:hamcrest-date:1.1.0'
}

And gradle.properties

org.gradle.jvmargs=-Xmx2048m
kotlin.incremental.usePreciseJavaTracking=true
android.enableD8=true
android.databinding.enableV2=true

gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

So far I have tried:

  • Invalidate cache and restart
  • Reimport project
  • Clean and rebuid
  • Clean install without former configurations + reimport project + no extra plugins installed
  • In gradle.properties commenting out each line by one or all of them + invalidate and restart
  • Tried implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" in gradle "just in case"

Nothing helped and errors still pop up almost in each file. As I can see this somehow is related to binding and kotlin.

Did anyone encounter this issue?

PS

In layout xml files non-existing string resources are not even highlighted, e.g. @string/non_existing_title - just appears as a valid string resource (even after clean install). Though I'm not sure if this issue is related to reported exceptions.

UPDATE 1

I noticed that after Invalidate & restart another exception is thrown once:

com/squareup/javapoet/TypeName
java.lang.NoClassDefFoundError: com/squareup/javapoet/TypeName
    at android.databinding.tool.ext.ExtKt.<clinit>(ext.kt:180)
    at android.databinding.tool.reflection.ModelClass.getTypeName(ModelClass.java:688)
    at android.databinding.tool.reflection.ModelClass.equals(ModelClass.java:694)
    at android.databinding.tool.reflection.ModelClass.findSetter(ModelClass.java:614)
    at android.databinding.tool.reflection.ModelClass.findGetterOrField(ModelClass.java:523)
....
Caused by: java.lang.ClassNotFoundException: com.squareup.javapoet.TypeName PluginClassLoader[org.jetbrains.android, 10.3.1] com.intellij.ide.plugins.cl.PluginClassLoader@19c41e97
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 63 more

I've tried to add javapoet dependency but this exception is still thrown once after invalidating. And then only Could not initialize class android.databinding.tool.ext.ExtKt exceptions are thrown as reported initially.

ANSWER

Answered 2018-Apr-12 at 09:52

After some hesitations I decided to move to canary channel and installed Android Studio Canary 10 (importing previous settings), and now specifications are:

Android Studio 3.2 Canary 10 Build #AI-181.2784.17.32.4705630, built on April 7, 2018
JRE: 1.8.0_152-release-1136-b01 amd64 
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.13.0-38-generic

On installing I had multiple issues with kotlin not finding many classes; invalidate and restart, clean/rebuild didn't help.

Then I just uninstalled Kotlin plugin from Plugins section and it looks like after restart it was restored with original version and I have no problems since.

Current Kotlin plugin version: Version: 1.2.31-Studio3.2-1

And at last everything works as expected. @Yazazzello, thanks for your feedback on Android Studio Canary #10.

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

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

Vulnerabilities

No vulnerabilities reported

Install hamcrest-date

You can download it from GitHub.
You can use hamcrest-date like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the hamcrest-date component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

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

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Consider Popular Date Time Utils Libraries
Compare Date Time Utils Libraries with Highest Support
Compare Date Time Utils Libraries with Permissive License
Compare Date Time Utils 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

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.