Android Studio auto-updating app.iml support libs to 'alpha' versions - android

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'
}

Related

Unsupported method: BaseConfig.getApplicationIdSuffix(). somehting missed in my build.gradle file

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"
}

Failed to find compile 'com.android.support:design-v7:25.0.0'

I'm trying to use material design. But 'com.android.support:design-v7:25.0.0' is giving the following error.
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.usaukglu.scrollabletab"
minSdkVersion 15
targetSdkVersion 25
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:25.0.0'
compile 'com.android.support:design-v7:25.0.0'
}
Error:Failed to find: com.android.support:design-v7:25.0.0 Open File.
Open in Project Structure dialog
Replace that line with this and it would definitely work.
'com.android.support:design:25.0.0'
Step 1: Open the build.gradle file for your application.
Step 2: Make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint. For example:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
there is some bug in the v7:25.0.0,(its for nougat) the preview of your layout will not be shown properly, so try to use v7:24.2.1,
but you need to install build tool
compileSdkVersion 24
buildToolsVersion "24.0.2"
compile 'com.android.support:appcompat-v7:24.2.1'
Copy paste this code:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.usaukglu.scrollabletab"
minSdkVersion 15
targetSdkVersion 25
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:25.0.0'
compile 'com.android.support:design-v7:25.0.0'
}
you had to change buildToolsVersion "21.1.2"
to buildToolsVersion "25.0.0"
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "liefsolutions.com.thebestservice"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'buildToolsVersion 24.9.5'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
}

android Studio gradle error hash string 21

apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "de.ts.prosper"
minSdkVersion 11
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:21.0.3'
}
Hi :)
Android Studio put this error message -
failed to find target with hash-string android-21
What is wrong? SDK 21 is installed in SDK and 23 also
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "de.tetzisoft.prosper"
minSdkVersion 11
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'
}
Now it Looks like this and it doesn't work - ???
Failed to sync gradle Project ???
Your compile version should be the same as buildToolsVersion "23.0.1".
Please change it to 23.
Also in dependencies set compile 'com.android.support:appcompat-v7:23.1.1'
I've just run your code and it works. You should maybe clean and rebuild the project.

Android Studio telling me it cannot resolve symbols?

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

Cannot Update buildtool version from build.gradle

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

Categories

Resources