This error pops up when i tried to build or run my project.
Program type already present: com.google.android.gms.actions.SearchIntents
Message{kind=ERROR, text=Program type already present: com.google.android.gms.actions.SearchIntents, sources=[Unknown source file], tool name=Optional.of(D8)}
Things that i've tried according to a thread that i found related to this:
- Invalidate Cache & restart
- Clean Project
Changing firebase version like so
- 'com.google.firebase:firebase-core:15.0.2' > 16.0.0
- 'com.google.firebase:firebase-database:15.0.1' > 16.0.1
- 'com.google.firebase:firebase-auth:15.0.0' > 16.0.1
Changing google-services version 3.2.1 > 3.3.0
Here's my build.gradle app
apply plugin: 'com.android.application'
//apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
buildscript {
repositories {
jcenter()
mavenCentral()
mavenLocal()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.google.gms:google-services:3.3.0'
classpath 'io.fabric.tools:gradle:1.25.3'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
}
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.arc.Dobyt"
minSdkVersion 25
targetSdkVersion 27
versionCode 4
versionName "3.0.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
annotationProcessor 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.1'
// implementation 'com.android.support:customtabs:27.0.2'
// implementation 'com.android.support:support-core-utils:27.1.1'
implementation 'com.android.support:support-core-ui:27.1.1'
implementation 'com.android.support:support-media-compat:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-annotations:27.1.1'
annotationProcessor "org.androidannotations:androidannotations:4.3.1"
implementation "org.androidannotations:androidannotations-api:4.3.1"
// implementation 'com.google.android.gms:play-services-maps:15.0.1'
// implementation 'com.google.android.gms:play-services-auth:15.0.1'
// implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation ('com.google.android.gms:play-services-maps:15.0.1') {
exclude group: 'com.google.android.gms', module: 'actions'
}
implementation ('com.google.android.gms:play-services-auth:15.0.1') {
exclude group: 'com.google.android.gms', module: 'actions'
}
implementation ('com.google.android.gms:play-services-location:15.0.1') {
exclude group: 'com.google.android.gms', module: 'actions'
}
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'//materialEditText
implementation 'com.mobsandgeeks:android-saripaar:2.0.2'
// implementation 'com.facebook.android:facebook-android-sdk:4.0.0'
// Facebook SDK
// implementation 'com.facebook.android:facebook-login:4.33.0'
// implementation 'com.facebook.android:facebook-core:4.33.0'
//implementation 'com.facebook.android:facebook-share:4.33.0'
//implementation 'com.facebook.android:facebook-places:4.33.0'
// implementation 'com.facebook.android:facebook-messenger:4.33.0'
// implementation 'com.facebook.android:facebook-applinks:4.33.0'
implementation ('com.facebook.android:facebook-login:4.33.0') {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'cardview-v7'
exclude group: 'com.android.support', module: 'customtabs'
}
implementation ('com.facebook.android:facebook-core:4.33.0') {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'cardview-v7'
exclude group: 'com.android.support', module: 'customtabs'
}
implementation ('com.facebook.android:facebook-applinks:4.33.0') {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'cardview-v7'
exclude group: 'com.android.support', module: 'customtabs'
}
implementation 'com.github.bumptech.glide:glide:3.8.0'//Glide
implementation 'com.roughike:bottom-bar:2.3.1'
//firebase
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-database:15.0.1'
implementation 'com.google.firebase:firebase-appindexing:15.0.1'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.androidadvance:topsnackbar:1.1.1'//Top Snack
implementation 'com.android.support:cardview-v7:27.1.1'//cardview
//location update
// implementation 'com.akhgupta:android-easylocation:1.0.1'
implementation 'com.akexorcist:googledirectionlibrary:1.0.5'
implementation ('com.akexorcist:googledirectionlibrary:1.0.5') {
exclude group: 'com.google.android', module: 'gms'
}
// GeoFire
implementation 'com.firebase:geofire-android:2.2.0'
implementation 'com.github.polok.routedrawer:library:1.0.0'//Route drawer
//crashlytic
implementation('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
}
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.getkeepsafe.dexcount'
My build.gradle project
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.arc.Dobyt">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="com.rider.aracanemap.googlemapsv2.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<!-- Required to show current location -->
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Google Plus permission -->
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:name=".adapter.AppController"
android:allowBackup="true"
android:hardwareAccelerated="false"
android:largeHeap="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/MyMaterialTheme"
>
<activity android:name=".SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".LocationService" />
<activity
android:name=".SignUp_Activity_"
android:theme="@style/AppTheme"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".SigninActivity_"
android:windowSoftInputMode="stateHidden|adjustResize">
</activity>
<activity
android:name=".ForgotPasswordActivity_"
android:windowSoftInputMode="stateHidden|adjustResize">
</activity>
<activity android:name=".LaunchActivity_">
</activity>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:screenOrientation="portrait"
android:value="@string/app_id" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.app.FacebookContentProvider637950799925113"
android:exported="true" />
<activity android:name=".DocUpload_Activity_" />
<activity android:name=".ImageUpload_" />
<activity
android:name=".Map_Activity_"
android:theme="@style/MyMaterialTheme">
</activity>
<activity android:name=".IntentActivity" />
<activity android:name=".TabActivity" />
<activity
android:name=".SettingActivity_"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".EditProfileActivity_"
android:windowSoftInputMode="stateHidden|adjustResize">
</activity>
<activity android:name=".RatingActivity_">
</activity>
<activity android:name=".EarningActivity_">
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="58ed39c94fbcd33ec9afa9b3b5b81a533b1c320a" />
</application>
</manifest>
I would really appreciate it if anyone can show or guide me the way because i have spent 2 days trying to find the source of the problem and sometimes even with the same code it either spit out error
Program type already present: com.google.android.gms.actions.SearchIntents
OR
Program type already present: com.google.android.gms.actions.ReserveIntents