Detailed explanation of the application of sweet alert dialog in Android studio

It's very kind to see this sweet alert dialog, because the tip used by the front-end developer is this JS plug-in. The Java cow is very powerful. It's directly made into a java package plug-in, good!

The following records how to refer to the project and use:

The sweet alert dialog plug-in can be downloaded directly from GitHub

Address: https://github.com/pedant/sweet-alert-dialog

Or download directly from the published page:

https://github.com/pedant/sweet-alert-dialog/releases

I downloaded the zip package of sweet-alert-dialog-1.1

Unzip the downloaded sweet-alert-dialog-1.1 package, and then in your app project, open file - > New - > import module and select the folder you just unzipped

report errors:

Error:Dependency Myalert:sweetalertdialog:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: D:\AndroidStudioProjects\TEST\Myalert\sweetalertdialog\build\outputs\apk\sweetalertdialog-release-unsigned. apk

You can build the sweet alert dialog project first.

In addition, bulid. In the gradle scripts directory of your project Under gradle (module: APP)

Import: compile 'CN pedant. sweetalert:library:1.3'

A new error message appears in build app:

Error:Execution Failed for task ‘:app:processDebugManifest'. Manifest merger Failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest. xml:7:9-43 is also present at [com.pnikosis:materialish-progress:1.0] AndroidManifest. xml:13:9-45 value=(@drawable/ic_launcher). Suggestion: add ‘tools:replace=”android:icon”' to element at AndroidManifest. xml:5:5-18:19 to override.

resolvent:

Modify androidmanifest xml:

Add xmlns: Tools = "in the manifest http://schemas.android.com/tools ”

Add tools: replace = "Android: icon, Android: theme, Android: allowbackup, Android: label, Android: supportsrtl" in the application

Add all Android: used in the application to tools: replace = above, separated by commas.

As follows:

At this point, the sweet alert dialog has been configured and can be used freely

The above is a detailed explanation of the application of sweet alert dialog in Android studio introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>