I wanted to compile my android studio project, somehow i ran into an error with firebase crashalytics. So I tried to fix the issue.
what I have now:
buildscript {
repositories {
...
maven { url = "https://maven.fabric.io/public" }
}
dependencies {
...
classpath "io.fabric.tools:gradle:1.25.1"
}
}
apply plugin: 'com.android.feature'
apply plugin: 'io.fabric'
So far so good, theoretically that should be it, from what I've read online. But I get an error now, ERROR: Cause: compileSdkVersion is not specified. so i googled this error, but all the solutions i found online where about the compileSdkVersion abd the targetSdkVersion differ.
compileSdkVersion 29
buildToolsVersion '29.0.2'
defaultConfig {
applicationId 'ch.workouttracker'
minSdkVersion 24
targetSdkVersion 29
versionCode 11
versionName '0.7.6'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resConfigs "de" // And any other languages you support
}
so this is not the case here, what else should I try?
Related
Building this App.
I got the following error and tried solutions for deleting chache and .gradle files folder, but it is not solved.
Error:Could not create service of type TaskArtifactStateRepository using TaskExecutionServices.createTaskArtifactStateRepository().
> Unexpected lock protocol found in lock file. Expected 3, found 0.
build.gradle file(tried with tools version 26.~ too):
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "edu.cmu.sphinx.pocketsphinx"
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.1"
}
}
dependencies {
implementation project(':aars')
implementation project(':models')
implementation 'com.android.support:appcompat-v7:27.1.1'
}
Here is my gradle settings.
ext {
android_compile_version = 26
android_version = '26.0.1'
android_min_sdk_version =15
appcompat_library_version = '25.2.0'
support_library_version = '25.2.0'
gms_library_version = '11.0.4'
}
this is define in my project.gradle file and
apply plugin: 'com.android.application'
android {
compileSdkVersion android_compile_version
buildToolsVersion android_version
defaultConfig {
applicationId "com.xxasda.stickman"
minSdkVersion android_min_sdk_version
targetSdkVersion compileSdkVersion
versionCode 2
versionName "1.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
compile "com.android.support:support-v4:${support_library_version}"
compile project(':libraries:BaseGameUtils')
}
buildscript {
repositories {
jcenter()
}
}
This is my Build.Gradle file I don't know why it's not compiling.
but when I try to run application on emulator it throws me this error
Failure [INSTALL_FAILED_OLDER_SDK]
Installation failed since app's minSdkVersion is newer than device's API level (API 23).
Please update your apps minSdkVersion.
Error while Installing APK
I checked many times and replace min_sdk_version with absolute value 15 but still no luck.any one please advice it would be helpful.
Thank you. :)
I'm also getting same issue
I have solved my issue making below changes
compileSdkVersion 'android-P'
targetSdkVersion 27
and the dependencies
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
implementation 'com.android.support:support-v4:28.0.0-alpha1'
implementation 'com.android.support:cardview-v7:28.0.0-alpha1'
hope it help someone
this can also be caused when creating the app and you select a higher minimum sdk so when creating empty activity select the lowest(Icecream) and you wont experience the same...was avictim of the same and i got sorted after realising the it
You can try to add to your build.gradle (D:\AppName\app\build.gradle) the following line under default config:
minSdkVersion 28 //or whatever version you need
defaultConfig {
applicationId "com.example.appname"
minSdkVersion 28 <<<----------------------------------
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
I'm creating an app that can use fingerprint authentication on devices having fingerprint sensor using FingerprintManager. I'm following google API Guides available here:
build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.goyal.fingerprinttest"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
}
}
}
dependencies {
compile "com.android.support:support-v4:24.1.1"
compile "com.android.support:support-v13:24.1.1"
compile "com.android.support:cardview-v7:24.1.1"
compile "com.android.support:appcompat-v7:24.1.1"
}
I found it myself
actually setInvalidatedByBiometricEnrollment is only visible on API level +24.
Just need to set compileSdkVersion to 24
I'm using Android-Studio.
When i tried to compile the project i got error:
Error:Execution failed for task ':app:processDebugResources'.
> at index 4
build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.myapp.user.myapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
}
Any suggestion please?thanks!
Change:
This:
buildToolsVersion "23.0.2"
To:
buildToolsVersion "21.0.1"
The newer buildTools sometimes have some bugs
I was having this exact same issue today. This is how I fixed it:
Check to see that the latest 23.0.3 build tool was installed. In my case (shown below), I noticed it wasn't installed:
Then, in my app level build.gradle, I changed this:
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
to
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
Hopefully this helps anyone encountering this issue recently.
I'm getting the following error in Android Studio 0.4.2 when I'm trying to Sync project with gradle.
Gradle 'GooglePlayServicesTest' project refresh failed:
Build script error, unsupported Gradle DSL method found: 'android()'!
My projects gradle file is as follows :-
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
android{
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 10
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
sourceSets{
main{
manifest.srcFile 'GooglePlayServicesTest/src/main/AndroidManifest.xml'
}
}
}
gradle file of module:-
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 10
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
}
also I have removed the miniSDKVersion and targetSDKVersion from AndroidManifest.xml
can someone help me to solve this error.
android method in project gradle file is not needed.Try to remove it.
Add top of your project build.gradle file:
apply plugin: 'com.android.application'