Sweet Alert dialog in the Android Studio application problem Description _android

Source: Internet
Author: User

See this sweet-alert-dialog is very cordial, because the front-end development I use the hint is this JS plug-in, Java Cow is very powerful, directly into a Java package plug-in, good!

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

Sweet-alert-dialog Plug-ins can be downloaded directly to the GitHub

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

or download it directly to the published page:

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

I downloaded the: sweet-alert-dialog-1.1 version of the ZIP package

Unzip the download sweet-alert-dialog-1.1 package and, in your app project, open file-> New-> Import Module and select to the folder you just unzipped.



Error:

Error:dependency Myalert:sweetalertdialog:unspecified on Project App. resolves to a 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 to your engineering Gradle scripts directory under Bulid.gradle (Module:app)

dependencies { 
compile filetree (include: [' *.jar '], dir: ' Libs ') 
testcompile ' junit:junit:4.12 ' compile ' 
com.android.support:appcompat-v7:24.1.1 ' 
compile ' cn.pedant.sweetalert:library:1.3 ' 
}

Introduction: Compile ' cn.pedant.sweetalert:library:1.3 '

New error message appears for 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 in androidmanifest.xml:5:5-18:19 to override.

Workaround:

Modify Androidmanifest.xml:

Add xmlns:tools= "Http://schemas.android.com/tools" to Manifest

Add tools:replace= "Android:icon,android:theme,android:allowbackup,android:label,android:supportsrtl" to Application

All Android that will be used in the application is added tools:replace=, comma-delimited.

As follows:

<?xml version= "1.0" encoding= "Utf-8"?> <manifest xmlns:android=
"http://schemas.android.com/apk/res/" Android "
xmlns:tools=" Http://schemas.android.com/tools "
package=" Cn.cgrs.myalert ">
< Application
tools:replace= "android:allowbackup,android:icon,android:label,android:supportsrtl,android: Theme "
android:allowbackup=" true "
android:icon=" @mipmap/ic_launcher "
android:label=" @string/app_ The name "
android:supportsrtl=" is true "
android:theme=" @style/apptheme ">
<activity android:name=". Mainactivity ">
<intent-filter>
<action android:name=" Android.intent.action.MAIN "/>
<category android:name= "Android.intent.category.LAUNCHER"/>
</intent-filter>
</ activity>
</application>
</manifest>

To this sweet-alert-dialog has completed the configuration, you can start to use ....

The above is a small set to introduce the Sweet Alert dialog in the Android Studio application problem explanation, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.