RingCaptcha SDK import into android studio shows two app icons -


i have added ringcaptcha sdk using android studio in app. after adding ring captcha sdk app shows 2 icons(my app , ringcaptcha sample). how can remove second app icon? have added following maven repository(url 'http://ringcaptcha.github.io/ringcaptcha-android'). added dependencies (compile 'com.thrivecom:ringcaptcha:1.0.7@aar')

thanks in advance.

launcher icons added app specifying <category android:name="android.intent.category.launcher" /> in androidmanifest.xml.

if have launcher specified 2 different activities 2 launcher icons.

take in androidmanifest.xml 2 activities this:

    <activity         android:name=".mainactivity"         android:label="@string/app_name" >         <intent-filter>             <action android:name="android.intent.action.main" />             <category android:name="android.intent.category.launcher" />         </intent-filter>     </activity> 

edit: have 1 launcher activity specified in androidmanifest.xml, second 1 must specified in ringcaptcha aar.

this second launcher activity being added androidmanifest.xml generated during manifest merge built dependencies project has (you can find file under build folder in app if want check contents).

you can view ringcaptcha aar manifest looking in build folder of project in android studio. should find here:

.../build/intermediates/exploded-aar/com.thrivecom/ringcaptcha/1.0.7 

opening androidmanifest.xml in folder confirms adding second launcher activity.

there 2 ways around this.

solution 1:

the easiest , best way use latest version of ringcaptch aar, 1.0.8.

compile 'com.thrivecom:ringcaptcha:1.0.8@aar' 

version 1.0.8 seems have removed offending activity should fix problem.

solution 2:

if whatever reason can't use latest version of ringcaptcha need learn more manifest merging , how control , override items during manifest merge. example may possible remove activity in aar library adding following manifest file.

<activity android:name="com.thrivecom.ringcaptcha.sample.mainactivity" tools:node="remove"/> 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -