i know the problem is stated at : Unsupported method: BaseConfig.getApplicationIdSuffix(), but the thing is that i don't have 'classpath' in builde.gradle file at all to change it. here is the build.gradle content:
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "20.0.0"
defaultConfig {
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
android studio 4.0.
i am new to android,
any help is highly appreciated
In your project's build.gradle file add this
dependencies {
classpath "com.android.tools.build:gradle:4.0.0"
}
Related
Why is Android Studio 1.5.1 (stable) auto-updating my app.iml file to use alpha support libraries?
My build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "my.app.id"
minSdkVersion 15
targetSdkVersion 22
versionCode 5
versionName "1.0.4"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven { url 'https://github.com/8tory/parse-android-sdk.m2/raw/master/' }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1'
compile 'com.android.support:support-v4:22.1'
compile 'com.android.support:recyclerview-v7:22.1'
}
Hello everyone i have gone through all the answers of stackoverflow but not solved my problem. here is my "build.gradle(app)" file.On compiling the gradle files with program i got the error that cann't find the file.
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.example.lalit.mapviewtest"
minSdkVersion 15
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'])
compile 'com.android.support:appcompat-v7:21.0.0'
}
Android Studio was telling me it couldn't resolve some symbols in my code. After research, it was apparent that my project was API level 23, which wasnt compatible with some of the code. I decided to change it to API level 21.
Below is the previous code in my build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.scriptdesigninc.test_app"
minSdkVersion 8
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'])
compile 'com.android.support:appcompat-v7:23.0.1'
}
I was told that I have to change it to the following,
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.scriptdesigninc.test_app"
minSdkVersion 14
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'])
compile 'com.android.support:appcompat-v7:22.2.0'
}
After I changed it, it told me I am missing the API package and that I have to download it, which I did. Then I clicked "retry" and it said it was unable to sync gradle project.
Please help, thank you in advance.
dependencies {
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
}
Add the above dependency in your build.gradle file.
This is happening because Android M does not supports the Apache HTTP API
I was trying to update build tool version from build.gradle and got this Gradle Sync Error message
:- I juset went to build.gradle file inside the app directory and changed the:
buildToolsVersion '20.0.1' to buildToolsVersion '23.0.0' and then everything went wrong.
so I looked at the SDK manager but the build tool is installed there
What should I do now?
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.example.android.didyoufeelit"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
repositories {
mavenLocal()
mavenCentral()
google()
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.1'
}
try to update this into the build.gradle
I followed the all of related question for this error and i tried :
1.changing the theme of the preview activity
//but I dont need this. It just changes the preview action bar (or other something) and I dont need this. (material personal app_theme)
2.change to API-21.
//This also fixes this error but we cannot see any action bar anymore with this option.
So, my Android Studio Version is:
1.2.1.1
I'm using API-22.
Build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "test.myapplication"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "test.myapplication"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
}
How to fix this?
After update the Android Studio to AI 141.1962279 From Canary Channel and i added this one on the Build.gradle and it's seems work now.
compile 'com.android.support:support-v4:22.1.1'