-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The library doesn't work #37
Comments
Hi @KChernenko, If you want a material design dialog, you only need to add:
Doing like below (your first try) is also okay:
I think the reason of your first exception is that you may include a nineoldandroids.jar lib to your project. If so, you should remove it. Because alertdialogpro-theme-material also depends on nineoldandroids. And Gradle can automatically resolve this dependency. You don't need to include it manually. |
Hi @KChernenko, How about now? |
Thank you for your answer! Yes, you are right - I use another library which used nineoldandroids. Therefore, there is a conflict. I'm trying to slove it. |
Hello @fengdai! I've sloved problem with the nineoldandroids library. But I still have |
Where did you use the |
Here is my style.xml:
|
Your code is correct. I don't know what the reason of this exception... Did you apply this style to |
Oh. Did you use |
I use |
Use |
Yep, it works. Thank you very much! |
You're welcome. |
Hello! I have some problems with the library.
Firstly, I've used gradle for adding yours library to my project:
After that I've added into my style.xml:
<item name="alertDialogProTheme">@style/Theme.AlertDialogPro.Material</item>
Then I've used this example of code in my class:
AlertDialogPro.Builder builder = new AlertDialogPro.Builder(getContext());
builder.setIcon(R.drawable.icon).
setTitle("Title").
setMessage("Message Body").
setNeutralButton("Neutral", null).
setPositiveButton("Positive", null).
setNegativeButton("Negative", null).
show();
But I 'm getting an Exception when I'm trying to run the project:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Android\sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --output
C:\Android\Releases\MealControl\app\build\intermediates\dex\debug --input-list=C:\Android\Releases\MealControl\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code: 2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define
Lcom/nineoldandroids/animation/Animator$AnimatorListener;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
When I'm trying to use version 0.1.0:
I'm getting an Exception:
android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.Resources.getValue(Resources.java:1131)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2327)
at android.content.res.Resources.getLayout(Resources.java:947)
at android.view.LayoutInflater.inflate(LayoutInflater.java:395)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:297)
at com.alertdialogpro.internal.AlertController.installContent(AlertController.java:193)
at com.alertdialogpro.AlertDialogPro.onCreate(AlertDialogPro.java:166)
at android.app.Dialog.dispatchOnCreate(Dialog.java:369)
at android.app.Dialog.show(Dialog.java:270)
at com.alertdialogpro.AlertDialogPro$Builder.show(AlertDialogPro.java:774)
at bitfrom.me.mealcontrol.views.RationFragment$1.onClick(RationFragment.java:53)
at com.gc.materialdesign.views.Button.makeCircle(Button.java:123)
at com.gc.materialdesign.views.ButtonRectangle.onDraw(ButtonRectangle.java:128)
When I leave only core:
I'm getting the same
android.content.res.Resources$NotFoundException: Resource ID #0x0
Exception.Thank you for attention.
The text was updated successfully, but these errors were encountered: