Java 在此代码中,我无法解析符号R
我使用了GitHub时间选择器对话框库,得到一个错误“找不到符号R” 1) 我用过的图书馆Java 在此代码中,我无法解析符号R,java,android,Java,Android,我使用了GitHub时间选择器对话框库,得到一个错误“找不到符号R” 1) 我用过的图书馆 implementation 'com.kovachcode:timePickerWithSeconds:1.0.1' 2) 错误行代码如下所示 setButton(context.getText(R.string.time_set), this); // in this line setButton2(context.getText(R.string.cancel), (OnClickLis
implementation 'com.kovachcode:timePickerWithSeconds:1.0.1'
2) 错误行代码如下所示
setButton(context.getText(R.string.time_set), this); // in this line
setButton2(context.getText(R.string.cancel), (OnClickListener) null);// in this line
//setIcon(android.R.drawable.ic_dialog_time);
LayoutInflater inflater =
(LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.time_picker_dialog, null);//in this line
setView(view);
mTimePicker = (TimePicker) view.findViewById(R.id.timePicker);//in this line
此文件也是只读文件,不可编辑。请给我一个解决办法
3) 这些都是我使用的依赖项
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.firebase:firebase-jobdispatcher:0.8.6'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.android.support:design:28.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.volley:volley:1.1.1-rc1'
implementation 'de.hdodenhof:circleimageview:3.0.1'
implementation 'info.androidhive:fontawesome:0.0.5'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.kovachcode:timePickerWithSeconds:1.0.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
在你的课堂上像这样导入。
导入com.yourpackage.R 在课堂上像这样导入。
导入com.yourpackage.R 它可能是“time\u picker\u dialog.xml”文件或任何其他xml文件上的错误。您可以检查它吗?它可能是“time\u picker\u dialog.xml”文件或任何其他xml文件中的错误。您能检查一下吗?请检查您的舱单并添加
tools:replace="android:icon, android:label, android:theme"
请检查您的舱单并添加
tools:replace="android:icon, android:label, android:theme"
您好,欢迎来到SO社区。您使用的时间选择器对话框库导致错误“找不到符号R”?库中的代码不可编辑?这就是你要问的吗?是的。我使用了github timepikerdialog和第二个依赖项。嗨,Arpit欢迎来到SO社区。您使用的时间选择器对话框库导致错误“找不到符号R”?库中的代码不可编辑?这就是你要问的吗?是的..我使用了github timepikerdialog和第二个依赖项..我检查了我的所有xml文件。。但是在xml中没有找到错误。我检查了我的所有xml文件。。但是在xml中没有发现错误。