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
Related
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"
}
Recently I changed my build tools version to accomodate a new functionality, but my gradle build is painfully slow. I can sync the project and it will build in about 5 minutes, but after that another build starts that has has gone 30 minutes plus.
I went from build tools version '19.1.0' to '23.0.1'.
Current build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.example.macuser.itestify"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.13.1'
compile 'com.google.android.gms:play-services-identity:9.0.2'
}
Previous build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.example.macuser.itestify"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:19.1.0'
}
What could be causing it to build really slowly? and how do I fix it?
NB I'm running Android Studio 1.4
EDIT: After waiting for forever, I get this error
9:45:07 AM Sending jdwp tracking request failed!
9:45:07 AM Adb connection Error:EOF
9:45:07 AM Connection attempts: 1
I don't think that it slower the gradle built speed.I have also tried building the app by changing the versions.It has no effect on the time.
CoverFlow is pushed to Maven Central as a AAR, so you just need to add the it's dependency to local build.gradle (usually locate in app module). Because of this libary is build in the min-sdk is 15, so your project must set same as it:
but when I try to use this library I got this error
Failed to resolve: com.github.moondroid.coverflow:library:1.0
this is my gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.maysara.theproject"
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.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.github.moondroid.coverflow:library:1.0'
compile 'com.android.support:cardview-v7:23.0.1'
}
Add to your graldle file:
apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
At first set minSdkVersion 15 instead of 16
Whats your Logcat says
so you just need to add the it's dependency to local build.gradle
(usually locate in app module). Because of this libary is build in the
min-sdk is 15, so your project must set same as it:
defaultConfig {
applicationId "com.example.maysara.theproject"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
FYI
Enable publishing AAR file to Maven Central
repositories {
jcenter() // or mavenCentral()
}
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'
}
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