I am using Android studio 2.3 and Thought for support new android 26 in my app.But I am stuck on error with title message. My gradle file is like below
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.shayari"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
manifestPlaceholders = [onesignal_app_id : "",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.gms:play-services-location:10.2.6'
compile 'com.android.support:support-v4:26.0.0'
compile 'com.google.android.gms:play-services-gcm:10.2.6'
compile 'com.google.android.gms:play-services-ads:10.2.6'
compile 'com.android.support:appcompat-v7:26.0.0'
compile 'com.android.support:preference-v7:26.0.0'
compile 'com.android.support:design:26.0.0'
compile 'com.android.support:cardview-v7:26.0.0'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:customtabs:26.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta3'
compile 'com.onesignal:OneSignal:[3.5.3,4.0.0)'
compile 'com.codemybrainsout.rating:ratingdialog:1.0.7'
compile 'com.android.support:support-vector-drawable:26.0.0'
compile 'com.google.android.gms:play-services-auth:10.2.6'
compile 'de.hdodenhof:circleimageview:2.1.0'
}
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
But I am not able to install support repository with below error..
Error:(39, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:C:/Users/MAITRII/Desktop/newhindi/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
410. An Android support library that enables the use of the ActionBar and Material Design specific implementations such as Toolbar for older devices down to Android v2.
Android AppCompat Library V7 The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later. License.
In the Properties window, select the "Android" properties group at left and locate the Library properties at right. Select /path/to/appcompat/ and Click Remove. Click Add to open the Project Selection dialog. From the list of available library projects, select v7 appcompat library and click OK.
When new versions of android are published, Google will have to support the older versions of android. So AppCompat is a set of support libraries which can be used to make the apps developed with newer versions work with older versions.
Add this to your project level build.gradle
file:
repositories {
maven {
url "https://maven.google.com"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With