Today, I upgraded latest Android Studio latest Version and build the project. And the problem is New Android Studio don't let me compile project with SDK 23...
I cannot build with SDK 25 because it is crush on lower SDK version and only work with some upper SDK. Please suggest how could I solve this problem.
Error:The SDK Build Tools revision (23.0.1) is too low for project ':app'. Minimum required is 25.0.0
Here is my gradle code,
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.app.androidlivetv"
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: "90582504-49da-44c1-8a3c-800ca73877af",
onesignal_google_project_number: "267076126070"]
minSdkVersion 16
targetSdkVersion 20
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
}
dependencies {
compile files('libs/picasso-2.4.0.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'it.neokree:MaterialTabs:0.11'
compile 'com.google.android.gms:play-services:10.2.0'
compile 'com.onesignal:OneSignal:2.+#aar'
compile 'com.devbrackets.android:exomedia:2.5.5'
compile 'com.google.android.exoplayer:exoplayer:r1.5.8'
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.android.support:multidex:1.0.1'
}
Just change the target sdk to 23 and compile with 25 it shouldn't crash..
You have to set in you gradle
buildToolsVersion "25.0.2"
And you have to upgrade build tools version as well.
Sample that should compile for min version 23 (
android {
compileSdkVersion 23
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
Related
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 11 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:11.0.4] C:\Users\kamal.android\build-cache\a14382872a293855060ea80fddf386831adf48b2\output\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.play_services" to force usage
apply plugin: 'com.android.application'
compileSdkVersion 23
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.carpedeem.bonne"
minSdkVersion 11
targetSdkVersion 23
ndk {
modandroid {
uleName "player_shared"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.google.android.gms:play-services:+'
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/PTAdChartboost.jar')
compile files('libs/PTAdRevMob.jar')
compile files('libs/support-v4-19.0.1.jar')
}
All you need to do is to update your minSdkVersion 11 to minSdkVersion 14 in the defaultConfig of your gradle file.
It means that your application must not have minSdkVersion (minimum SDK version) lesser than the minSdkVersion of any of the libraries that you're using - in your case [com.google.android.gms:play-services:11.0.4] library with minimum SDK of 14.
update your gradle file and build project again.
Change the minSdkVersion to 14 in your build.gradle app and upgrade your compileSdkVersion to 7.0 and your buildToolsVersion to 26.0.0.
I am new to Android development. I have the default app which comes with Android studio which has a label on screen. When I try to run the app in an emulator, I get these errors:
I searched and then updated my sdk api to level 23. My gradle build is set to compile for 23 as well but I get this error and it won't run.
Your compile SDK version must match the support library's major version.
use compileSdkVersion 25
try this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "your_id"
minSdkVersion 16
targetSdkVersion 25
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(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
}
EDIT
For Sdk 23
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "your_id"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:support-v4:23.2.0'
the idea is to use same version
I've seen a lot of people having a similar problem and the solution was a change of version on either the compileSdkVersion or the Support Libraty Version.
Here my problem is that I do have the same compileSdkVersion and the same Support Library Version but the error still shows.
This is my build.gradle
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "my.package.com"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
ext {
supportLibVersion = '23.4.0'
}
dependencies {
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:design:${supportLibVersion}"
compile "com.android.support:cardview-v7:${supportLibVersion}"
compile "com.android.support:recyclerview-v7:${supportLibVersion}"
compile "com.android.support:support-v4:${supportLibVersion}"
}
The error:
This support library should not use a different version(24) than the compileVersionSDK(23)
The error began to show right after I updated to Android Studio 2.2
I have a problem with Gradle !!
It keeps showing me errors , can some one help me to resolve this problem
Note: It's my first time to install android studio
Try using this:
compile 'com.android.support:appcompat-v7:24.1.0'
Use latest support library and change your target and compile sdk also
compileSdkVersion 24
buildToolsVersion "24.0.1"
targetSdkVersion 24
Try it
compile "com.android.support:appcompat-v7:23.0.1"
and you can change targetSdkVersion 23
Please use my project gradle values and also update sdk libraries:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
multiDexEnabled true
applicationId "com.example.student" //change as your package name
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
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:23.0.1'
}
Try to match all versions:
compileSdkVersion 23
buildToolsVersion '23.0.0'
targetSdkVersion 23
Add Following dependencies:
compile 'com.android.support:appcompat-v7:23.0.0'
Make sure you use latest version of Sdk:
how to update sdk
The problem is you're using
compile 'com.android.support:appcompat-v7:19.+'
which gives you all possibilities of Android 4.4.2 Kitkat API 19 and older.
In your project you're trying to use Material Themes which belongs to newer version, I mean com.android.support:appcompat:$version, where version > 21.
Material Design was introduced with Android 5.1 Lollipop API 21
I higly reccomend you to change your build.gradle file to:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
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.2.1"
}
but of course changing appcompat library to version :
com.android.support:appcompat-v7:23.0.1"
would be enough ;-)
Hope it would help
I import an eclipse project into my android studio. The original project's target is android-14, but my studio's mimimum API version is 21. And I don't want to download the API 14, how should solve my problem?
You only must have downloaded the SDK configured as compileSdkVersion. Your SDK configured as minSdkVersion can be a lower version such as API 14.
In the Android Studio the configuration is realized in build.grade file. For example:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile project(":lib")
compile 'com.android.support:appcompat-v7:19.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
you have to add dependencies in build.gradle to use
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"