2016-12-13 51 views
-2

当我克隆Android的默认报警Anroid的开源项目@https://android.googlesource.com/platform/packages/apps/DeskClock/,并试图在Android Studio中运行它,我得到了以下错误:package com.android.datetimepicker.time不存在?

package com.android.datetimepicker.time does not exist 

cannot find symbol class TimePickerDialog 

cannot find symbol class RadialPickerLayout <anonymous 
com.android.deskclock.alarms.TimePickerCompat$TimerPickerPreL$1> is 
not abstract and does not override abstract method 
processTimeSet(int,int) in OnTimeSetListener 

请以任何方式帮助。谢谢。

+0

发布您的gradle文件代码 – sasikumar

+0

可能重复[导入com.android.datetimepicker无法解析](http://stackoverflow.com/questions/24345424/the-import-com-android-datetimepicker-cannotbe已解决) –

回答

-1

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.

Here is the main answer

+1

请不要复制并粘贴其他用户的答案。如果您认为该帖子会回答此问题,请将其作为该问题的复本投票。你有足够的代表来投这个选票。 –

+0

是啊投票关闭标签@MikeM。 –

+0

感谢@ChintanKhetiya指出它们在Android SDK本身中不存在。这让我在Android源代码项目中探索更多。我编辑了这个问题,以添加Android默认闹钟源代码的网址。 – madu

1

沮丧的一个星期后,我就能够复制默认的闹钟应用,并获得由注入的依赖于gradle这个去掉上面提到的以上的DateTimePicker的错误:

编译'com.github.citux:datetimepicker:0.2.0'

感谢那里的好人(https://github.com/CiTuX/datetimepicker),他们已经克隆和分发了Android Android Open Source Pr中使用的框架的gradle dependency oject @https://android.googlesource.com/platform/frameworks/opt/datetimepicker

希望这能帮助一些在克隆Android开源项目上工作的人。

相关问题