prolificinteractive / material-calendarview

A Material design back port of Android's CalendarView
https://prolificinteractive.github.io/material-calendarview/
MIT License
5.92k stars 1.32k forks source link

Compilation error could not find LocalDate #947

Open chpalesha opened 5 years ago

chpalesha commented 5 years ago

Error line: mcvDisplayDeliveries.setSelectedDate(CalendarDay.today());

error: cannot access LocalDate class file for org.threeten.bp.LocalDate not found

gradle build: 5.1.1

implementation 'com.github.prolificinteractive:material-calendarview:2.0.1'

tahercool1 commented 5 years ago

I'm having the same issue.

EmilHW commented 5 years ago

Bump, having the same issue after updating Android Studio to version 3.4

ghazzan commented 5 years ago

need help, iam getting same issue here, try to import threetenbp.jar, but still get error

Slash-912001 commented 5 years ago

I solved! include in Project -> build.gradle -> dependencies this line;

implementation 'com.jakewharton.threetenabp:threetenabp:1.2.0'

In Class where you got error delete :

import java.time.LocalDate

and now write this line in import declaration:

import org.threeten.bp.LocalDate;

Rebuild your project .

Excuse for my english. I hope it works for you too.

Greetings.
Slash-912001

ghazzan commented 5 years ago

@Slash-912001, thank you! the error is gone, hope this issue can be updated on this library

rafael-labela commented 5 years ago

I still have it, needed o include the dependency

evanova commented 5 years ago

Similar issue. Adding

implementation 'com.jakewharton.threetenabp:threetenabp:1.2.0'

fixed it.

Slash-912001 commented 5 years ago

@rafael-labela, excuse me for late answer:

you must include in file build.gradle inside dependencies this line:

'com.jakewharton.threetenabp:threetenabp:1.2.0'

and then in Class where you have the error write this line:

import org.threeten.bp.LocalDate; (if you use java.time.LocalDate) at top of the Class. Delete the import java.time.LocalDate or if you use LocalTime delete java.time.LocalTime and then always at the top of the Class write import org.threeten.bp.LocalTime;. Rebuild your project.

Bye.

Slash-912001

Rahulucky03 commented 4 years ago

include below dependency with the material calendar view (version 2.0.1)

implementation 'com.jakewharton.threetenabp:threetenabp:1.2.1'

It worked for me, Hope it works for you also. :)

IwonGunawan commented 4 years ago

implementation 'com.jakewharton.threetenabp:threetenabp:1.2.0'

@evanova thank you, work for me.