I get the following errors while trying to build a signatured APK:
I've looked through ThreadPoolExecutor.java and there are some errors but when I'm editing it, it says that it's not part of the project so I'm assuming it's part of the IDE? What could be the problem?
Here's my plugin.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId 'com.riddimdub.radio'
minSdkVersion 24
targetSdkVersion 28
versionCode 1
versionName "1.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
}
I found the answer:
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
In the android { }
Related
My new build.gradle is
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.example.koran.myapplication"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { res.srcDirs = ['src/main/res', 'src/main/res/animations'] } }
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
implementation 'com.google.android.gms:play-services-games:15.0.1'
}
I changed compileSdkVersion to 27, up from 26 (same thing for targetSdkVersion).
The only compile error is get is error: cannot find symbol method setVolumeControlStream(int). This method is called from the onStart() method of my MainActivity (which extends AppCompatActivity). I only started getting this error once I changed my gradle file. I'm pretty sure it's because of this line:
implementation 'com.android.support:appcompat-v7:27.0.0'
I get an error from this line saying
All com.android.support libraries must use the exact same version specification
What does this mean? Why is setVolumeControlStream not recognized?
When I upgraded android studio to version 3 I've got this problem:
Error:(246, 5) error: duplicate value for resource 'attr/rippleColor' with config ''.
this is my gradle:
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.faravani.app"
minSdkVersion 16
targetSdkVersion 26
versionCode 4
versionName "2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.1.0'
testCompile 'junit:junit:4.12'
}
please help me i don't know what should I do.
Try to rename rippleColor attribute in your attr file (I presume attrs.xml). It is probably in conflict with some android theme attribute .
change
supportLibraryVersion = "25.4.0"
to
supportLibraryVersion = "25.3.1"
works for me
I have recently started learning android studio and install android studio on linux mint 18 and got stuck at this problem. My build.gradle file contains this code
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.android.justjava"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:25.+'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'junit:junit:4.12'
}
Just Replace your compile 'com.android.support:appcompat-v7:25.+'
with newest Dependency like compile 'com.android.support:appcompat-v7:25.3.1'
I created a new Application and I am getting these errors
This is my app level
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.vfirst.genie"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'
}
Download the latest version of Android Support Repository, Android Support Library and Google Repository from your SDK Manager.
I think it should solve the issue.
A problem occurred configuring project app could not resolve all the dependicies for configurations app:debug could not find com.app.support v7-23.0.3
My gradle bundle file is as follows
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.app.quiz.activity"
minSdkVersion 11
targetSdkVersion 18
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.3'
compile 'com.android.support'
}