简体   繁体   中英

The import com.android.datetimepicker cannot be resolved

I've imported an existing Android project to Eclipse, but I'm getting errors on the following imports:

import com.android.datetimepicker.time.RadialPickerLayout;
import com.android.datetimepicker.time.TimePickerDialog;

I already have the android-support-v4.jar library added to the build path. Could anybody help me to figure out what is missing?

Neither of those classes exist in the Android SDK. There is a TimePickerDialog , as others have noted, in a different package . There is a RadialPickerLayout in the Android source code , and you are welcome to try to use it.

Really, you should be talking to whoever wrote this Android project and asking them where they were planning on getting those classes from.

If you have added the datetimepicker library where you have the package com.android.datetimepicker palced, please add the following to main project's build.gradle dependencies section:

compile project(':library')

This worked for me. Please let me know your comments.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM