I can't build a project with Android 27 as target SDK and 27.0.3 as buildToolsVersion.
My Android studio version is 3.0.1 and I also have google() in my repositories in project's buid.gradle.
I get this error:
> Could not resolve com.android.support:design:27.0.3.
> Failed to download SHA1 for resource 'https://maven.google.com/com/android/support/design/27.0.3/design-27.0.3.pom'.
> For input string: "<!"
Because of there isn't 27.0.3, you can use 27.0.1,27.0.2,27.1.0 instead. You can check the valid revision on here.
As per now use 27.0.2
compileSdkVersion 27
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.example.packagename"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
implementation 'com.android.support:design:'27.0.2'
Try this code:
android {
compileSdkVersion 24
buildToolsVersion '26.0.2'
aaptOptions {
cruncherEnabled = false
}
defaultConfig {
applicationId "com.rokolabs.app.rokostickers"
minSdkVersion 19 // use 19 only use for transition(21)
targetSdkVersion 23
versionCode 117
versionName "0.1.30"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
}
}
Related
I got this error after trying to run a Kotlin application through Android Studio:
A problem occurred evaluating project ':app'.
> No signature of method: build_4blexxmb1pl0fsds689m8rkwz.android() is applicable for argument types: (build_4blexxmb1pl0fsds689m8rkwz$_run_closure1) values: [build_4blexxmb1pl0fsds689m8rkwz$_run_closure1#220b09f3]
The error points me to this section of the build.gradle:app file (specifically, the line with android {):
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
buildFeatures {
viewBinding = true
defaultConfig {
applicationId "com.example.bitfighter"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildReleases {
viewBinding = true
}
What does this error message mean, and what can I change to fix the issue?
Try to structure the code like this
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.bitfighter"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
viewBinding = true
}
The defaultConfig should always only be in the android clause and not inside the buildFeatures. Other than that, you don't need a buildReleases clause when you already have added a buildFeatures clause.
I developed app with React Native. I tried build but building does not end.
show image
Task :app:multiDexListRelease
Task :app:mergeReleaseJavaResource
These tasks have been processed for 17 minutes. Is this normal?
app/build.gradle
defaultConfig {
applicationId "com.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true
missingDimensionStrategy 'react-native-camera', 'general'
}
In your build.gradle file do you have the following:
android{
...
defaultConfig {
...
minSdkVersion 21
multiDexEnabled true
}
...
}
multiDexEnabled needs to be true in order for these gradle commands to run.
I have recently started using the android studio. Just after installing and downloading all the requisite files, I am welcomed by this error,"Failed to find the target with the hash string 'API 27'....", whereas I already have both API 27 and 28 installed (although 28 shows up to be partly installed).
I am completely new to this software.
Tools
SDK
error
you should use like below in gradle
{
compileSdkVersion 27
buildToolsVersion '27.0.1'
defaultConfig {
applicationId "xxxxxxxxx"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
}
don't write like compileSdkVersion 'API 27' its compileSdkVersion 27 only
Getting error while running project with target v 22. I can not change target version.
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
gradle file - build.gradle file :
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.adsl.beaconapp"
minSdkVersion 19
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
Try deleting the build folder and then clean the project
Syncing the project files with gradle files in android studio is resulting in the following error
Error:(14, 0) Could not find method applicationId() for arguments [com.amazon.mysampleapp] on project ':app' of type org.gradle.api.Project.
where the gradle file reads
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
applicationId "com.amazon.mysampleapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled = true
}
What is happening here? Removing applicationID moves the error to minSdkVersion
The applicationId doesn't go inside the android block, but instead your buildConfig block:
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "19.1"
defaultConfig {
applicationId "com.example.my.app"
minSdkVersion 15
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
}
Pulled that from this page about applicationId: http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename