On Android Studio 3.5 I face these errors:
finished with non-zero exit value 1
and
app:compiledebugrenderscript and execute taskaction errors.
https://ibb.co/ZzbwRL7
https://ibb.co/pwVBQnX
https://ibb.co/4VxJ4ZY
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileOptions.encoding = 'ISO-8859-1'
defaultConfig {
applicationId "......"
minSdkVersion 23
targetSdkVersion 28
multiDexEnabled = true
versionCode 7
versionName "7"
renderscriptTargetApi 28
//renderscriptSupportModeEnabled true // don't use support library as it bloats the APK, and we don't need pre-4.4 support
//need build tools higher than 20 at least to support ScriptIntrinsicHistogram
testApplicationId "......"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
}
dexOptions {
jumboMode = true
preDexLibraries = false
javaMaxHeapSize "4g"
}
compileOptions {
sourceCompatibility '1.7'
targetCompatibility '1.7'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.android.support:multidex:1.0.3'
}
within the dependencies section try to change the version of appCompact:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:23.2.1'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.android.support:multidex:1.0.3'
}
Related
I'm getting this error after I update my android studio...
More than one file was found with OS independent path
'org/jsoup/nodes/entities-full.properties'
My "app Build.gradle"
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "info.androidhive.newsaggregator"
minSdkVersion 16
targetSdkVersion 28
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
//implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.facebook.android:facebook-android-sdk:4.11.0'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.mcxiaoke.volley:library-aar:1.0.0'
implementation 'org.jsoup:jsoup:1.8.3'
implementation 'com.github.siyamed:android-shape-imageview:0.9.3#aar'
implementation files('libs/gson-2.2.2.jar')
implementation files('libs/android-async-http-1.4.4.jar')
implementation('com.github.florent37:materialviewpager:1.1.3#aar') {
transitive = true
}
implementation 'com.github.clans:fab:1.6.3'
repositories {
mavenCentral()
}
implementation 'com.makeramen:roundedimageview:2.2.1'
implementation project(':library')
}
My "project build.gradle"
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
My "library Build.Gradle"
apply plugin: 'com.android.library'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.nineoldandroids:library:2.4.0'
}
Can anyone help me figuring out what's causing this error?
Any ideas on how to get this working? if you need more information please let me know. I am very new to this. Thank you so much in advance.
apply plugin: 'com.android.application'
apply plugin: 'net.saliman.cobertura'
android {
compileSdkVersion 26
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "ch.zhaw.facerecognition"
minSdkVersion 21
targetSdkVersion 26
versionCode 28
versionName "1.5.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
cobertura {
coverageFormats = [ 'html', 'xml' ]
}
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
classpath 'net.saliman:gradle-cobertura-plugin:2.4.0'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
api 'com.android.support:appcompat-v7:26.0.0'
api 'com.android.support:support-v4:26.0.0'
api 'ch.zhaw:facerecognitionlibrary:1.5.3'
}
The compiler is android studio.
Above is my build file after I build it the compiler told me that Configuration 'provided' is obsolete and has been replaced with 'compileOnly'.
But where is the provided?
Replace "api" with "implementation" and your issue will be solved, like this:
implementation 'com.android.support:appcompat-v7:26.0.0'
implementation 'com.android.support:support-v4:26.0.0'
implementation 'ch.zhaw:facerecognitionlibrary:1.5.3'
While loading my app throws this error, then displays the layout normally. How can I stop it from throwing this error? Happens on both android 8 and android 6.
https://pastebin.com/AyYkdeY0
build.gradle
apply plugin: 'ashcollauthlogin.darkzek.com'
android {
compileSdkVersion 28
defaultConfig {
applicationId "ashcollauthlogin.darkzek.com"
minSdkVersion 18
targetSdkVersion 28
versionCode 2
versionName "2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
buildToolsVersion '27.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
api 'com.android.support:design:28.0.0-alpha3'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:customtabs:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.github.navasmdc:MaterialDesign:1.5#aar'
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support:support-v13:28.0.0-alpha3'
}
repositories {
jcenter()
}
SettingsActivity.java:43
setContentView(R.layout.activity_settings);
android {
compileSdkVersion 28
defaultConfig {
applicationId "ashcollauthlogin.darkzek.com"
minSdkVersion 18
targetSdkVersion 28
versionCode 2
versionName "2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
I was getting this error:
Error:Execution failed for task ':app:preDebugBuild'.
Android dependency 'com.android.support:appcompat-v7' has different version for the compile (25.3.1) and runtime (27.1.0) classpath. You should manually set the same version via DependencyResolution
A quick search on google showed me that I should include in my app/build.gradle:
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "25.3.1"
}
}
Now I get a new error:
Could not get unknown property 'resolutionStrategy' for project ':app' of type org.gradle.api.Project.
here is my full app/build.gradle code:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
dexOptions {
preDexLibraries = false
}
defaultConfig {
applicationId "co.test.Test"
minSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
flatDir {
dirs 'libs'
maven { url "http://dl.bintray.com/chat-sdk/chat-sdk-android" }
google()
maven { url "https://jitpack.io" }
mavenLocal()
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':library')
implementation 'co.chatsdk.chatsdk:chat-sdk-core:4.0.8'
implementation 'co.chatsdk.chatsdk:chat-sdk-ui:4.0.8'
implementation 'co.chatsdk.chatsdk:chat-sdk-firebase-adapter:4.0.8'
implementation 'co.chatsdk.chatsdk:chat-sdk-firebase-file-storage:4.0.8'
}
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "25.3.1"
}
}
apply plugin: 'com.google.gms.google-services'
my library/build.gradle:
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86", "armeabi", "mips"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation files('libs/aacdecoder-android-0.8.jar')
}
I get the following error when trying to execute the following line of code.
import com.example.albert.helper.SessionManager;
Error:(15, 33) error: package com.example.albert.helper does not exist
apply plugin: 'com.android.library'
android {
compileSdkVersion 21
buildToolsVersion '21.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.1.1'
}