Closed ftp27 closed 7 years ago
Do you use proguard?
No.
This is really strange. I will check it. Please, write device android version, app build tools version
java.lang.NoSuchFieldError: dmax.dialog.R$id.progress at dmax.dialog.SpotsDialog.initProgress(SpotsDialog.java:76) at dmax.dialog.SpotsDialog.onCreate(SpotsDialog.java:49) at android.app.Dialog.dispatchOnCreate(Dialog.java:353) at android.app.Dialog.show(Dialog.java:257) i didn't get it before. I suddendly started getting it today device android version - 4.4.4 app build tools version - 21.1.2
I can't reproduce it on android 4.4.4 with build tools 21.1.2 and spots dialog version 0.4 If you are using proguard, add these into your custom rules file:
-keep class dmax.dialog.** {
*;
}
May be you use progress id in your project. Please, check it out
One more question. Can you reproduce it in 100% times ?
It was working fine for me till this morning. I didn't change anything. I am not using proguard and progress id. //alertDialog = new SpotDialog.... I get this error on alertDialog.show();
Now I'm getting this error 100% times on my kitkat device :(
Okay. Googling and Stackowerflowing made this clear. The problem comes, when you use in project layout resource with the same name as library uses. In you case this is dialog.xml. Do you have such layout file? Try to rename it and check this issue again. And I will rename resoures files in library to some more complex names to avoid such overridings
Yeah. This was it. :smile: Thanks Maksym and renaming your resource files sounds like a good idea :+1:
Great. I am happy, we have found the solution :) Version 0.6 will contain this renaming fix.
Fixed in version 0.6
Hello, I am getting the line as follows
AlertDialog dialog=new SpotsDialog(MainActivity.this); //error in this line as follows
Incompatible types. Required: android.support.v7.app.AlertDialog Found: dmax.dialog.SpotsDialog
Hi @rajesh7777 . You should replace import android.support.v7.app.AlertDialog
with import android.app.AlertDialog
thank you!
hellow please i am geting error at this line : final AlertDialog waitingDialog = new SpotsDialog(this); waitingDialog.show(); waitingDialog.setMessage("Please waiting...."); waitingDialog.setCancelable(false);
here is the error : error: constructor SpotsDialog in class SpotsDialog cannot be applied to given types; required: Context,String,int,boolean,OnCancelListener found: MainActivity reason: actual and formal argument lists differ in length
Hi @rajesh7777 . You should replace
import android.support.v7.app.AlertDialog
withimport android.app.AlertDialog
Thanks This Helps me Now it's working <3
thanks bro
Hello. Your library causes error: