I have the following error when I has converted the Android Build Tools Version to 26.0.0 and add the metadata for:
Facebook .
Fabric.
compile 'com.google.android.gms:play-services:11.0.4'
The Error Is :
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed with multiple errors, see logs
My Manifest :
<?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="moments.com.arabsooq"
android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature
android:name="android.hardware.camera" android:required="true" />
<application
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="#mipmap/ic_launcherr"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcherr"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".activities.SplashScreen"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.MainActivity"
android:label="#string/title_activity_main"
android:screenOrientation="portrait"
android:theme="#style/AppTheme">
<intent-filter android:label="#string/app_name_ar">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.arabsoog.com"
android:pathPrefix="/create"
android:scheme="http" />
</intent-filter>
</activity>
<activity
android:name=".activities.ChooseCountry"
android:screenOrientation="portrait" />
<activity
android:name=".activities.LoginChooser"
android:screenOrientation="portrait" />
<activity
android:name=".activities.SubCategory"
android:screenOrientation="portrait" />
<activity
android:name=".activities.Advertisments"
android:screenOrientation="portrait" />
<activity
android:name=".activities.ProductAct"
android:screenOrientation="portrait" />
<activity
android:name=".activities.AddAd"
android:screenOrientation="portrait" />
<activity
android:name=".activities.Search"
android:label="#string/title_activity_search"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".activities.DoneAdd"
android:screenOrientation="portrait"
android:theme="#style/MyAlertDialogStyle" />
<activity
android:name=".activities.MyProfile"
android:label="#string/title_activity_my_profile"
android:screenOrientation="portrait" />
<activity
android:name=".activities.SearchResult"
android:screenOrientation="portrait" />
<activity
android:name=".activities.MyFave"
android:screenOrientation="portrait" />
<activity
android:name=".activities.UpdateAdd"
android:screenOrientation="portrait" />
<activity
android:name=".activities.AboutApp"
android:screenOrientation="portrait"
android:theme="#style/MyAlertDialogStyle" />
<activity
android:name=".activities.Contact_User"
android:screenOrientation="portrait"
android:theme="#style/MyAlertDialogStyle" />
<activity
android:name=".activities.MyAds"
android:label="#string/title_activity_my_ads"
android:theme="#style/AppTheme" />
<service
android:name=".services.MyFirebaseInstanceIDService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<service
android:name=".services.MyFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<meta-data
tools:replace="android:value=25.3.1"
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name=".activities.Zoom"
android:theme="#style/MyAlertDialogStyle" />
<meta-data
android:name="io.fabric.ApiKey"
android:value="83b5fdfbb15ad6f9567027ae5a20c3fe99e2cedf" />
</application>
</manifest>
My Gradle :
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.24.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "moments.com.arabsooq"
minSdkVersion 17
targetSdkVersion 26
versionCode 23
versionName "0.0.14"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.6#aar') {
transitive = true;
}
compile 'org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.3'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support:support-v4:26.0.0-alpha1'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5#aar'
compile 'com.tasomaniac:delayed-progress:0.4'
compile 'com.taishi-y:flipprogressdialog:0.1.0'
compile 'net.gotev:uploadservice:3.2.4'
compile 'net.gotev:uploadservice-okhttp:3.2.4'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'xyz.dev_juyoung:cropicker:1.0.3'
compile 'com.reginald.swiperefresh:library:1.1.2'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.daimajia.easing:library:2.0#aar'
compile 'com.daimajia.androidanimations:library:2.3#aar'
compile 'com.nispok:snackbar:2.6.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.google.firebase:firebase-crash:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-ads:11.0.4'
compile 'com.google.android.gms:play-services-ads:11.0.4'
compile 'com.google.android.gms:play-services:11.0.4'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}
Error Log :
2017-08-21 10:45:47,158 [61689741] DEBUG - com.crashlytics - Frame
activated for project: Project
'G:\ArabSoog\ArabSoog\ArabSooqApplication' ArabSooqApplication
2017-08-21 10:45:49,204 [61691787] INFO -
ild.invoker.GradleBuildInvoker - About to execute Gradle tasks:
[clean, :app:generateDebugSources,
:app:generateDebugAndroidTestSources, :app:mockableAndroidJar,
:app:prepareDebugUnitTestDependencies]
2017-08-21 10:45:49,210 [61691793] INFO -
s.plugins.gradle.GradleManager - Instructing gradle to use java from
C:/Program Files/Android/Android Studio/jre
2017-08-21 10:45:49,273 [61691856] INFO -
ild.invoker.GradleBuildInvoker - Build command line options:
[--configure-on-demand, -Pandroid.injected.invoked.from.ide=true,
-Pandroid.injected.generateSourcesOnly=true, --init-script, C:\Users\HAMZAA~1\AppData\Local\Temp\asLocalRepo4354.gradle]
2017-08-21 10:45:49,273 [61691856] INFO -
xecution.GradleExecutionHelper - Passing command-line args to Gradle
Tooling API: [--configure-on-demand,
-Pandroid.injected.invoked.from.ide=true, -Pandroid.injected.generateSourcesOnly=true, --init-script, C:\Users\HAMZAA~1\AppData\Local\Temp\asLocalRepo4354.gradle]
2017-08-21 10:45:50,510 [61693093] INFO -
pl.ProjectRootManagerComponent - project roots have changed
2017-08-21 10:45:50,594 [61693177] INFO -
.diagnostic.PerformanceWatcher - Pushing properties took 3ms; general
responsiveness: ok; EDT responsiveness: ok
2017-08-21 10:45:50,610 [61693193] INFO -
.diagnostic.PerformanceWatcher - Indexable file iteration took 16ms;
general responsiveness: ok; EDT responsiveness: ok
2017-08-21 10:45:50,610 [61693193] INFO -
indexing.UnindexedFilesUpdater - Unindexed files update started: 2
files to update
2017-08-21 10:45:50,687 [61693270] INFO -
.diagnostic.PerformanceWatcher - Unindexed files update took 77ms;
general responsiveness: ok; EDT responsiveness: ok
I was removed this line from Manifest:
tools:replace="android:value=25.3.1"
and using this code in build.gradle
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.0'
}
}
}
}
using this resourse :
Comments
Related
I am working on a version of an Android app and I would like to release a new update. The app compiles well, but when I try to generate a release apk or bundle, I always get the same Gradle errors that I cannot solve, as I don´t understand the problem. I have been wrapping my head around this for days, so I would be thankful for any help or hints.
This is the error log of the failing gradle task:
> Task :app:processReleaseMainManifest
/Users/dwa2112/Development/Template/Template/app/src/main/AndroidManifest.xml:31:5-235:19 Warning:
application#android:icon was tagged at AndroidManifest.xml:31 to replace other declarations but no other declaration present
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
/Users/dwa2112/Development/Template/Template/app/src/main/AndroidManifest.xml:57:9-67:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.onesignal.GcmBroadcastReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/Users/dwa2112/Development/Template/Template/app/src/main/AndroidManifest.xml:109:9-114:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.onesignal.BootUpReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/Users/dwa2112/Development/Template/Template/app/src/main/AndroidManifest.xml:115:9-119:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.onesignal.UpgradeReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
This is my Android Manifest:
<?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="com.sherdle.universal">
<!-- Always Required to get content and check if internet is available -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Always Required for image coaching & maps -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- Required for notifications & radio -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- Required for maps -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Required for visualizer & radio -->
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" />-->
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- Required for tumblr -->
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<!-- Required for in-app purchases -->
<uses-permission android:name="com.android.vending.BILLING" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:name=".App"
android:allowBackup="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning"
tools:replace="android:icon">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<!-- Activities -->
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:exported="true"
android:label="#string/app_name"
android:theme="#style/AppTheme.Launcher"
tools:node="merge" />
<activity
android:name=".login.LoginActivity"
android:configChanges="orientation|screenSize"
android:exported="true"
android:label="#string/app_name"
android:theme="#style/AppTheme.Launcher"
tools:node="merge" />
<activity
android:name="com.onesignal.NotificationOpenedActivityHMS"
android:exported="false"
android:theme="#style/Theme.CanPostThis2.SplashTheme"
tools:replace="android:theme"
tools:node="merge" />
<activity
android:name=".SplashScreenActivity"
android:exported="true"
android:theme="#style/Theme.CanPostThis2.SplashTheme"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".picer_lib.activity.ImagePickActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<activity
android:name=".picer_lib.activity.ImageBrowserActivity"
android:exported="true"
android:hardwareAccelerated="false"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<service
android:name=".Fcm.MyFirebaseMessagingService"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".Fcm.GCMRegistrationIntentService"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<activity
android:name=".picer_lib.activity.VideoPickActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<activity
android:name=".picer_lib.activity.AudioPickActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<activity
android:name=".picer_lib.activity.NormalFilePickActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<activity android:name=".providers.rss.ui.RssDetailActivity" />
<activity android:name=".providers.videos.ui.VideoDetailActivity" />
<activity android:name=".providers.wordpress.ui.WordpressDetailActivity" />
<activity android:name=".providers.woocommerce.ui.ProductActivity" />
<activity
android:name=".comments.CommentsActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".HolderActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".attachmentviewer.ui.AttachmentActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".attachmentviewer.ui.AudioPlayerActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".attachmentviewer.ui.VideoPlayerActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".providers.woocommerce.ui.CheckoutActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".providers.woocommerce.ui.WooCommerceLoginActivity"
android:configChanges="orientation|screenSize"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".providers.videos.player.YouTubePlayerActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="sensor"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" />
<!-- Services -->
<service
android:name=".providers.audio.player.player.PlaybackService"
android:exported="true"
tools:node="merge" />
<service android:name=".providers.radio.player.RadioService" />
<service android:name=".attachmentviewer.MusicService" />
<!--
A receiver that will receive media buttons and send as
intents to your MediaBrowserServiceCompat implementation.
Required on pre-Lollipop. More information at
http://developer.android.com/reference/android/support/v4/media/session/MediaButtonReceiver.html
-->
<receiver
android:name="androidx.media.session.MediaButtonReceiver"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<receiver
android:name=".providers.audio.player.media.MediaSessionReceiver"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<!--<receiver android:name=".providers.soundcloud.player.player.PlayerReceiver">
<intent-filter>
<action android:name="android.media.AUDIO_BECOMING_NOISY" />
</intent-filter>
</receiver>-->
<!-- Meta Data -->
<meta-data
android:name="com.onesignal.NotificationOpened.DEFAULT"
android:exported="true"
android:value="DISABLE"
tools:node="merge" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:exported="true"
android:value="#string/google_maps_key"
tools:node="merge" />
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:exported="true"
android:value="true"
tools:node="merge" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="true"
android:grantUriPermissions="true"
tools:node="merge">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/provider_paths" />
</provider>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="${applicationId}.firebaseinitprovider"
android:exported="false"
tools:node="remove" />
</application>
</manifest>
This is my build.gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
name 'Google'
}
google()
maven {
url 'https://jitpack.io'
}
}
}
buildscript {
ext.kotlin_version = '1.7.10'
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.jaredsburrows:gradle-license-plugin:0.8.80'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.14.0'
}
repositories {
google()
maven {
url 'https://plugins.gradle.org/m2/'
}
maven {
url 'https://maven.google.com/'
}
jcenter()
}
}
ext {
supportlib_version = '29.0.0'
gps_version = '[16.0.0, 17.0.0)'
fb_version = '[16.0.0, 18.0.0)'
}
allprojects {
repositories {
google()
jcenter()
}
}
This is my build.gradle for the module:
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'com.jaredsburrows.license'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
/*
* To update licenses, run:
* - cd [project location]
* - ./gradlew licenseReleaseReport
*/
licenseReport {
generateHtmlReport = true
generateJsonReport = false
// These options are ignored for Java projects
copyHtmlReportToAssets = true
copyJsonReportToAssets = false
}
android {
compileSdkVersion 33
defaultConfig {
applicationId "com.webagenten.canpostthis"
minSdkVersion 19
targetSdkVersion 33
multiDexEnabled true
versionCode 12
versionName "7.0"
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
//Optionally configure your OneSignal IDs below
manifestPlaceholders = [manifestApplicationId : "${applicationId}",
onesignal_app_id : "",
onesignal_google_project_number: ""]
}
signingConfigs {
release {
storeFile file("")
storePassword ""
keyAlias ""
keyPassword ""
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
}
}
dexOptions {
jumboMode true
}
applicationVariants.all { variant ->
if (variant.buildType.name == 'release') {
variant.mergeAssets.doLast {
delete(fileTree(dir: variant.mergeAssets.outputDir, includes: ['x86/ffmpeg', '**/*.ffmpeg']))
}
}
variant.getRuntimeConfiguration().exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
}
repositories {
flatDir {
dirs 'libs'
}
maven {
url "https://jitpack.io"
}
mavenCentral()
jcenter()
}
dependencies {
implementation 'com.devbrackets.android:exomedia:4.3.0' //TV
implementation 'com.google.android.exoplayer:exoplayer:2.18.2' //TV & Radio
implementation 'com.cleveroad:audiovisualization:1.0.1' //Radio
implementation 'com.google.code.gson:gson:2.8.9' //WC
implementation 'com.squareup.okhttp3:okhttp:3.12.1' //WC
implementation 'org.jsoup:jsoup:1.13.1'
implementation 'com.google.firebase:firebase-analytics:21.2.0'
// Faceook SDK
implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.facebook.android:facebook-core:[4,5)'
implementation 'com.facebook.android:facebook-marketing:[4,5)'
implementation 'com.onesignal:OneSignal:[3.13.0, 3.99.99]'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.duolingo.open:rtl-viewpager:1.0.2'
implementation 'com.github.chrisbanes:PhotoView:1.3.0'
implementation 'com.github.ed-george:AndroidVimeoExtractor:1.2.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.multidex:multidex-instrumentation:2.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.media:media:1.2.1'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.google.android.gms:play-services-ads:19.0.1'
implementation "com.google.android.gms:play-services-maps:17.0.0"
implementation 'com.google.android.material:material:1.3.0'
implementation "com.android.billingclient:billing:3.0.2"
implementation 'com.google.firebase:firebase-ads:19.0.1'
implementation 'com.google.firebase:firebase-analytics:18.0.2'
implementation 'com.google.firebase:firebase-crashlytics:17.3.1'
implementation 'com.google.firebase:firebase-messaging:21.0.1'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'androidx.fragment:fragment:1.1.0'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.onesignal:OneSignal:3.16.1'
implementation('com.squareup.picasso:picasso:2.71828') {
exclude group: "com.github.vansikrishna:Multimager:1.0.8", module: "jetified-Multimager-1.0.8-runtime"
}
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.duolingo.open:rtl-viewpager:1.0.2'
implementation 'com.github.chrisbanes:PhotoView:1.3.0'
implementation 'com.github.ed-george:AndroidVimeoExtractor:1.2.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.multidex:multidex-instrumentation:2.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.5'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.media:media:1.6.0'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation project(path: ':imagepicker')
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation 'com.google.android.gms:play-services-ads:21.4.0'
implementation "com.google.android.gms:play-services-maps:18.1.0"
implementation 'com.google.android.material:material:1.7.0'
implementation "com.android.billingclient:billing:5.1.0"
implementation 'com.google.firebase:firebase-ads:21.4.0'
implementation 'com.google.firebase:firebase-analytics:21.2.0'
implementation 'com.google.firebase:firebase-crashlytics:18.3.2'
implementation 'com.google.firebase:firebase-messaging:23.1.1'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'androidx.fragment:fragment:1.5.5'
debugImplementation 'androidx.fragment:fragment-testing:1.5.5'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.crystal:crystalrangeseekbar:1.1.3'
implementation 'com.github.vansikrishna:Multimager:1.0.8'
implementation 'com.google.android.gms:play-services-ads:21.4.0'
implementation 'mobi.upod:time-duration-picker:1.1.3'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-analytics:21.2.0'
//implementation 'com.arthenica:mobile-ffmpeg-full:4.2.2.LTS'
implementation 'com.arthenica:mobile-ffmpeg-full-gpl:4.2.2.LTS'
}
I would appreciate any hints or help, as I simply don´t understand what´s wrong here, as the mentioned receivers in the error log are simply not part of the manifest.
First of all I know there are many similar question, but my case is different. Please read the full question first!
This is the full error...
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/firebase/appindexing/Action$Builder$StatusType.class
Whenever I am trying to run in my emulator this error is showing.
Also if I try to generate .apk file (in debug or released mode), the same error is showing.
Now the magic...
If I run in my mobile phone in debug mode, it is totally ok. No errors are showing, it is running fine.
This is my manifest file...
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.brandtechnosolutions.petbaazar">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="#drawable/iconpetbazar"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.Light">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--
ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information.
-->
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity android:name=".WebActivity" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:screenOrientation="portrait" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".BuyerSellerActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".OptionActivity"
android:label="#string/title_activity_option"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".TakeAdInfoActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"/>
</application>
</manifest>
My build.gradle...
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
dexOptions {
javaMaxHeapSize "1g"
}
repositories {
mavenCentral()
}
defaultConfig {
applicationId "com.brandtechnosolutions.petbaazar"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// apply plugin: 'com.google.gms.google-services'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:support-v4:25.1.0'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'junit:junit:4.12'
}
Using sdk platforms...
Gingerbread, Honeycomb, Marshmallow
Using emulator with Jelly Bean.
Anybody has any idea how to solve it, please help!
You should use the same level of libraries:
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.android.gms:play-services-appindexing:10.0.1'
Also add at the buttom of the file:
apply plugin: 'com.google.gms.google-services'
EDIT:
To use the plugin you have to add the dependency in the buildscript block (in your top-level file or module file):
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
// ...
}
Project is working fine and not gerenating any error message when Minimum SDK is set to 21, but this Error message occurs when i set it to 19.
Error:Execution failed for task ':app:processArmeabi-v7aDebugManifest'.
Manifest merger failed with multiple errors, see logs
I am sharing my gradle and Manifest file, Kindly guide me what i am doing wrong here.
Project Level build gradle File.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.google.gms:google-services:2.1.0'
classpath 'com.google.code.gson:gson:2.2.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
App Level Build Gradle File
apply plugin: 'com.android.application'
android {
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a'
universalApk true
}
}
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId com.myapp.app
minSdkVersion 19
targetSdkVersion 23
versionCode 39
versionName "1.0"
multiDexEnabled true
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86"
}
}
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile 'com.squareup.okhttp:logging-interceptor:2.6.0'
compile 'org.glassfish:javax.annotation:10.0-b28'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.google.maps.android:android-maps-utils:0.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-maps:9.0.0'
compile 'com.google.android.gms:play-services-analytics:9.0.1'
compile 'com.google.android.gms:play-services-location:9.0.1'
compile 'com.google.android.gms:play-services-ads:7.5.0'
compile 'io.card:android-sdk:5.4.0'
compile 'it.sephiroth.android.library.targettooltip:target-tooltip-library:1.3.15'
compile 'com.github.michaelye.easydialog:easydialog:1.4'
compile 'com.google.android.gms:play-services:9.0.1'
}
Android Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.App.MyApp">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- GCM Permissions -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<application
android:name=".AnalyticsSampleApp"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<service android:name=".application.services.LogoutService" />
<!-- GCM RECEIVER -->
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.App.MyApp" />
</intent-filter>
</receiver>
<service
android:name=".GoogleCloudMessaging.GcmService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!-- GCM RECEIVER -->
<activity
android:name=".MyAppMainActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".MapsActivity"
android:label="#string/title_activity_maps">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SplashDefaultActivity" />
</activity>
<activity
android:name=".SplashDefaultActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SplashVideoActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".VideosListActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/title_activity_videos_list"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".VideoActivity"
android:configChanges="orientation|screenSize"
android:label="#string/title_activity_video"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.taskMapActivity"
android:label="#string/task_map"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.checkout.LoginActivity"
android:label="#string/checkout_login_Activity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.SectionsActivity"
android:label="#string/section_screen"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.streetFullScreenActivity"
android:label="#string/street_full_screen"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".application.activities.streetFullScreenSectionActivity"
android:label="#string/street_full_screen_section"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".HomeActivity"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".TestActivity"
android:label="#string/title_activity_test"
android:theme="#style/AppTheme" />
<activity
android:name=".gameActivity"
android:label="#string/title_activity_game_day"
android:parentActivityName=".MyAppMainActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SplashDefaultActivity" />
</activity>
<activity
android:name=".taskViewActivity"
android:label="#string/title_activity_task_view"
android:parentActivityName=".gameActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.App.MyApp.gameActivity" />
</activity>
<activity
android:name=".TeamActivity"
android:label="#string/title_activity_team"
android:parentActivityName=".MyAppMainActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SplashDefaultActivity" />
</activity>
<activity
android:name=".LegalActivity"
android:label="#string/title_activity_legal"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".game.SimplestreetViewerActivity" />
<activity android:name=".game.insiderActivity" />
<activity android:name=".CoachesBioActivity" />
<activity
android:name=".TeamStandingsActivity"
android:label="#string/title_activity_team_standings"
android:theme="#style/AppTheme" />
<activity
android:name=".WebViews.Slider_News_View"
android:label="#string/title_activity_news__web__views"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".WebViews.MyAppGear"
android:label="#string/title_activity_MyApp_gear"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".ContactsActivity"
android:label="#string/title_activity_contacts"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_settings"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".videonPlayerActivity"
android:configChanges="orientation|screenSize" />
<activity android:name=".LollipopVideoListActivity" />
<activity
android:name=".MyAppPromotionActivity"
android:label="#string/title_activity_MyApp_promotion"
android:theme="#style/AppTheme"
android:screenOrientation="portrait"
></activity>
</application>
</manifest>
Error Log
2016-09-29 18:03:52,218 [79526482] WARN - .tools.idea.model.ManifestInfo - getMergedManifest failed Manifest merger failed with multiple errors, see logs
2016-09-29 18:04:04,174 [79538438] INFO - pl.ProjectRootManagerComponent - project roots have changed
2016-09-29 18:04:28,192 [79562456] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 0ms; general responsiveness: ok; EDT responsiveness: ok
2016-09-29 18:04:28,266 [79562530] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 74ms; general responsiveness: ok; EDT responsiveness: ok
2016-09-29 18:04:29,657 [79563921] INFO - pl.ProjectRootManagerComponent - project roots have changed
2016-09-29 18:04:31,543 [79565807] INFO - .diagnostic.PerformanceWatcher - High memory usage (free 200 of 1246 MB) while dumping threads to C:\Users\taha\.AndroidStudio2.2\system\log\threadDumps-20160928-195850-AI-145.3276617\20160929-180431\threadDump-20160929-180431.txt
2016-09-29 18:04:39,732 [79573996] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 3ms; general responsiveness: ok; EDT responsiveness: ok
2016-09-29 18:04:40,045 [79574309] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 313ms; general responsiveness: ok; EDT responsiveness: ok
2016-09-29 18:04:40,045 [79574309] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 10932 files to update
2016-09-29 18:04:47,545 [79581809] INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 7500ms; general responsiveness: 0/24 sluggish, 17/24 very slow; EDT responsiveness: ok
2016-09-29 18:04:47,846 [79582110] WARN - .tools.idea.model.ManifestInfo - getMergedManifest failed Manifest merger failed with multiple errors, see logs
2016-09-29 18:04:48,529 [79582793] INFO - attrs.AttributeDefinitionsImpl - Found tag with unknown parent: AndroidManifest.AndroidManifestCompatibleScreens
2016-09-29 18:04:48,529 [79582793] INFO - attrs.AttributeDefinitionsImpl - Found tag with unknown parent: AndroidManifest.AndroidManifestSupportsInput
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="sam.gymnotes" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/NoActionBar" >
<meta-data
android:name="com.google.android.gms.version"
/>
<activity
android:name=".activity_ExcersiseView"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".dialog_new_excersise"
android:label="dialog_new_excersise"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".activity_IconChooser"
android:label="#string/title_activity_icon_chooser" >
</activity>
<activity
android:name=".activity_WorkoutView"
android:label="#string/title_activity_activity__workout_view" >
</activity>
<activity
android:name=".dialog_are_you_sure"
android:label="#string/title_activity_dialog_are_you_sure"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".activity_SetView"
android:label="#string/title_activity_activity__set_view" >
</activity>
<activity
android:name=".dialog_edit_workout"
android:label="#string/title_activity_dialog_date_picker"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".dialog_new_set"
android:label="#string/title_activity_dialog_new_set"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".dialog_edit_note"
android:label="#string/title_activity_dialog_edit_note"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".dialog_3option"
android:label="#string/title_activity_dialog_convert"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".activity_Info"
android:label="#string/title_activity_info" >
</activity>
</application>
</manifest>
The above is my manifest file, I have gone through numerous answers on here for a malformed manifest and I cannot figure out what the issue is. What is causing the 'Error while Installing APK'. All I get when trying to run is
pkg: /data/local/tmp/sam.gymnotes
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
gradle;
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '24.0.0'
defaultConfig {
applicationId "sam.gymnotes"
minSdkVersion 14
targetSdkVersion 24
versionCode 4
versionName "1.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.google.android.gms:play-services:9.2.0'
}
1) Put </manifest> in the end of the file.
2) Use following code for gms version
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
EDIT
try this answer
-> File
-> project structure
-> app
-> dependencies
-> click on +
-> library dependency
-> select play-services (October 2015: com.google.android.gms:play-services:7.8.0)
-> Rebuild
i migrate to eclipse to Android studio and install the latest version of Android studio 1.3 and i am using too many libraries projects and some of jar files. but now when i try to run this project its always show me
Picked up _JAVA_OPTIONS: -Xmx512M
Error:Execution failed for task ':app:preDexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 3
i place there he write hat remove _JAVA_OPTION -Xm512 will remove app in you project but nothing happen. this is is below my gradle.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 22
buildToolsVersion '21.0.1'
defaultConfig {
applicationId "com.iptikarpromotion"
minSdkVersion 9
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile files('libs/google-http-client-1.16.0-rc.jar')
compile files('libs/gson-2.1.jar')
compile files('libs/google-play-services.jar')
compile project(':libraries:ImageSliderLibrary')
compile project(':libraries:CircularImageView')
compile project(':libraries:GalleryViewLibrary')
}
And manifist is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.iptikarpromotion" >
<permission
android:name="com.example.iptikarpromotion.permission.MAPS_RECEIVE"
android:protectionLevel="signature"></permission>
<uses-permission android:name="com.example.androidmapsv2.permission.MAPS_RECEIVE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application android:name="com.iptikarpromotion.utils.ApplicationData"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:hardwareAccelerated="true"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBVgaZHjJmXd6pQNRISnzzSbEN0B3aJuns"/> <!-- bebug key= AIzaSyBVgaZHjJmXd6pQNRISnzzSbEN0B3aJuns -->
<activity
android:name=".activity.SplashActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.LoaderActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.HomeActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.DetailActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.WebviewActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.MapActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.GalleryViewActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.MyFavourateActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.MyAdsActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.ContactUsActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.OurServicesActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.QuicklyPickActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.AllCategoriesGridViewActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.AllCategoriesChildActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.PromotionActivity" android:screenOrientation="portrait"></activity>
</application>
</manifest>
This my jar files
gson-2.1.jar
google-play-services.jar
google-http-client-1.16.0-rc.jar
AndroidEasingFunctions-1.0.0.jar.
Thanks
Remove Java_option in Environment Variable of System of Windows. Exit Android Studio and run it again.