how to use anko library in androidx - android

so I want to use Anko library on my apps by use Androidx, and I want to add Anko library inside of my apps on android studio, I use API version 30, android 10.0+ (R), but when I Add Anko library on my project I get the error :
Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [org.jetbrains.anko:anko-design:0.10.8] /Users/anjay/.gradle/caches/transforms-2/files-2.1/1d0aabee6b3e238a89acc21f650d01a8/jetified-anko-design-0.10.8/AndroidManifest.xml as the library might be using APIs not available in 14
Suggestion: use a compatible library with a minSdk of at most 14,
or increase this project's minSdk version to at least 15,
or use tools:overrideLibrary="org.jetbrains.anko.generated.design" to force usage (may lead to runtime failures)
This is my build.gradle (Module level):
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.example.apithemoviedb"
minSdkVersion 14
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
// implementasi atau library androidx design
implementation 'com.google.android.material:material:1.0.0-alpha3'
// implementasi atau library androidx anko
implementation "org.jetbrains.anko:anko-design:$anko_version"
implementation "org.jetbrains.anko:anko:$anko_version"
// RecyclerView-v7
implementation "org.jetbrains.anko:anko-recyclerview-v7:$anko_version"
implementation "org.jetbrains.anko:anko-recyclerview-v7-coroutines:$anko_version"
//implementasi atau library picasso
implementation 'com.squareup.picasso:picasso:2.71828'
//implementasi atau library Gson
implementation 'com.google.code.gson:gson:2.8.6'
}
This is my build.gradle (project level):
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.3.72"
ext.anko_version='0.10.8'
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This is my AndroidManifest.xml :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.apithemoviedb">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="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>

I don't understand... How about just increase minSdkVersion as the error log said and see what's gonna happen?

Related

Unresolved Class ParseFirebaseInstanceIdService in AndroidManifest

Context:
Implementing Cloud Push Notifications on Android via Parse Server
as Backend and Firebase Cloud Messaging Service
Goal: Sending a push notification from Parse to the subject Android Application
Problem:
When injecting class com.parse.fcm.ParseFirebaseInstanceIdService into AndroidManifest.xml file, it goes unresolved.
Already-tried Solutions:
Changing the Firebase and Parse packages versions in build.gradle (App File) as well as changing the dependencies versions in build.gralde (Project File)
Project files:
AndroidManifest.xml
(Portion of the file where the error occurs)
<service
android:name="com.parse.fcm.ParseFirebaseInstanceIdService"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
build.gradle (Project)
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle (Module)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "com.sytech.uber"
minSdkVersion 24
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//Parse
implementation "com.github.parse-community.Parse-SDK-Android:parse:1.20.0"
implementation "com.github.parse-community.Parse-SDK-Android:fcm:1.20.0"
implementation 'com.parse.bolts:bolts-android:1.4.0'
//Toasty https://github.com/GrenderG/Toasty
implementation 'com.github.GrenderG:Toasty:1.4.2'
//Firebase
implementation'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-messaging:17.6.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
FirebaseInstanceIdService is no longer usable. Use latest version of parse and FirebaseMessagingService
implementation "com.github.parse-community.Parse-SDK-Android:fcm:1.21.0"
And use ParseFirebaseMessagingService
<service
android:name="com.parse.fcm.ParseFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
Just to add to Md. Asaduzzaman's answer, make sure to override the onNewToken() method in your custom FirebaseMessagingService, like in this tutorial. (I just found the tutorial and thought it would be nice to share it if others are stuck with the same problem).
#Override
public void onNewToken(String s) {
super.onNewToken(s);
Log.i("NEW_TOKEN", s);
}
We need to override it because:
"FirebaseInstanceIdService: This class was deprecated. In favour of overriding onNewToken in FirebaseMessagingService.
Once that has been implemented, this service can be safely removed."

Manifest merger failed with multiple errors, see logs AndroidManifest.xml:requires a placeholder substitution but no value for

Below is the unexpected error. How can I debug this?
Merging Errors: Error: Attribute meta-data#onesignal_app_id#value at AndroidManifest.xml:50:9-52:51 requires a placeholder substitution but no value for is provided. app main manifest (this file), line 49 Error: Attribute meta-data#onesignal_google_project_number#value at AndroidManifest.xml:54:9-56:70 requires a placeholder substitution but no value for is provided. app main manifest (this file), line 53
Code:
?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.muhammadtehmoor.my_fyp">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera2" />
<uses-feature android:name="android.hardware.camera" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="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>
This is my build.gradle (app level). I have imported most of the dependencies from the Firebase plugin in Android Studio.
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
// buildToolsVersion '26.0.1'
defaultConfig {
applicationId "com.muhammadtehmoor.my_fyp"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-auth:11.0.4'
implementation 'com.google.firebase:firebase-database:11.0.4'
implementation 'com.google.firebase:firebase-storage:11.0.4'
testImplementation 'junit:junit:4.12'
implementation 'com.hbb20:ccp:2.1.9'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.alimuzaffar.lib:animated-edit-text:2.0.2'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.google.android.gms:play-services-maps:11.0.4'
implementation 'com.google.android.gms:play-services-gcm:11.0.4'
implementation 'com.google.android.gms:play-services-location:11.0.4'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.github.d-max:spots-dialog:1.1#aar'
implementation 'com.onesignal:OneSignal:3.+#aar'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'me.spark:submitbutton:1.0.1'
//glidle
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.github.Mahfa:DayNightSwitch:1.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
//firebase ui
// implementation 'com.firebaseui:firebase-ui-auth:3.1.0'
// implementation 'com.google.android.gms:play-services-auth:11.0.4'
}
//apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.gms.google-services'
This is my build.gradle (project :my_Fyp). I have imported most of the dependencies from the Firebase plugin in Android Studio.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
//classpath 'com.google.gms:google-services:3.1.0'
classpath 'com.google.gms:google-services:4.2.0'
}
}
//configurations.all {
// resolutionStrategy.force 'com.android.support:support-v4:27.1.0'
//}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io'}
maven {url 'https://dl.bintray.com/spark/maven'}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The error message suggests that the OneSignal library is not configured correctly. Looking trough their setup instructions it seems like you missed point 1.3.
Add this to the app level build.gradle; inside the android/defaultConfig tag:
manifestPlaceholders = [
onesignal_app_id: 'PUT YOUR ONESIGNAL APP ID HERE',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
This might help...
Try going to your
android/app/build.gradle
find defaultConfig and add the following
manifestPlaceholders = [
onesignal_app_id: 'ONE SIGNAL APP ID',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.app.android"
...
manifestPlaceholders = [
onesignal_app_id: 'ONE SIGNAL APP ID HERE',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
}
Your Onesignal Google project number is your Firebase Sender ID.

I want to add google mobile ad dependency to my build.gradle file. But it is showing a red marked underline which occurs run time crash to my app

I want to show ad in my app using Admob. But when I add google mobile ad dependency to my build.gradle file and sync project, it is showing red underline. It is showing "All gms/firebase libraries must use the exact same version specification" How to solve it? I add google() to my build.gradle(project) file and tried to add updated version of dependency.
build.gradle file, project level gradle file, manifest file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.nabil.drawerlayout"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
}
```
project level gradle:
```
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
```
manifest file:
```
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.nabil.drawerlayout">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/logo"
android:label="#string/app_name"
android:roundIcon="#mipmap/logo"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity" />
<activity
android:name=".AfterSearchActivity"
android:parentActivityName=".MainActivity" />
<activity android:name=".AfterallBusFragmentActivity" />
<activity
android:name=".SplashScreenActivity"
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>
<activity android:name=".FaqActivity" />
<activity android:name=".AboutAppActivity" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/admob_app_id"/>
</application>
</manifest>
```

AAPT2 error: check logs for details(Build failed)

I just backed to my old project as I have been along time didn't work on it and I found a lot of errors as a build error in gradle as I use the compile instead implementation and many other process I tried to solve this error a lot but I failed as this my window error that's I couldn't recognize as I used also old Libraries from github
this is myGradle (build.gradle(Project:Waiterer))
// 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'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and this is build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "abtech.waiteriano.com.waitrer"
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation project(':jtds-1.3.1')
implementation project(':library')
implementation project(':librarySV')
implementation 'com.android.support:support-v4:25.2.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:25.3.1'
implementation 'com.roughike:bottom-bar:1.3.9'
implementation 'com.android.support:recyclerview-v7:25.2.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
implementation 'com.github.clans:fab:1.6.2'
implementation 'de.hdodenhof:circleimageview:1.3.0'
implementation 'com.android.support:cardview-v7:25.3.1'
testImplementation 'junit:junit:4.12'
implementation "com.android.support:gridlayout-v7:23.1.1"
}
and this my first gradle library I use
build.gradle(Module:library)
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion '27.0.3'
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:23.1.1'
}
and this is my second library I use
build.gradle(Module:librarySV)
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.novoda:bintray-release:0.8.1'
}
}
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.4.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:23.1.1'
implementation 'com.android.support:design:23.1.1'
}
publish {
userOrg = 'miguelcatalan'
groupId = 'com.miguelcatalan'
artifactId = 'materialsearchview'
publishVersion = '1.4.0'
desc = 'Cute library to implement SearchView in a Material Design Approach'
website = 'https://github.com/MiguelCatalan/MaterialSearchView'
}
hope this could be clear enough If any some thing not clear tell me
Note that: I am not using API I use JDBC JTDS Connection to retrieve data from data base
Thing is developers are not comfortable to new AS still. Way of showing error is changed (is weird now).
First scroll to down in build errors. If you see an error, click to expand it. It will show you error most probably.
Second If that does not work (like i faced in data binding, where no errors were shown)
Then try build with debug or stacktrace
Go to
File > Settings > Build, Execution, Deployment > Compiler
add like this (add --stacktrace or --debug), it will log the exceptions. You can see what is causing issue.
Okay, so the problem is with the AndroidManifest in your app module:
<activity android:name=".Main2Activity">
<service
android:name="SoftKeyboard"
android:permission="android.permission.BIND_INPUT_METHOD"
tools:ignore="WrongManifestParent">
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
<meta-data
android:name="android.view.im"
android:resource="#xml/method" />
</service>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
According to the documentation the 'service' element must be nested under 'application' not 'activity'. So change that part of code to:
<activity android:name=".Main2Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name="SoftKeyboard"
android:permission="android.permission.BIND_INPUT_METHOD"
tools:ignore="WrongManifestParent">
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
<meta-data
android:name="android.view.im"
android:resource="#xml/method" />
</service>
This will fix the error you are getting from AAPT2. For your project to build successfully you will also need to update your dependencies as described here. If you do both, everything should build correctly. :)

failed to resolve 'com.google.android.gms.play-services:+7'

for the first time I am using google maps in my android studio project I have added the dependency in my project but i ma geeting error
Here is all the code from build.gradle(project:Location) file of my project
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
here is the all the code from build.gradle(Module.app) file of my project
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.example.anonymous.location"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.google.android.gms.play-services:+7'
testCompile 'junit:junit:4.12'
}
Here is the all code from my AndroidMenifest.xml file of my project
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.anonymous.location">
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/
google_play_services_version"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="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>
compile 'com.google.android.gms.play-services:+7'
it should be-
compile 'com.google.android.gms:play-services:7+'
but you should avoid inexact versions, use more specific like "9.4.0" or whatever suits your application.
https://developers.google.com/android/guides/releases check here for the versions. check what functionality you want and use that version code. Also note the different variant of play-services are available.
Like Arnav said, you have to use -
compile 'com.google.android.gms:play-services:7+'
Adding to that, if you want to check the latest dependency for any library,
use this - Check latest version of any library

Categories

Resources