I have a problem with Android Studio saying:
failed to resolve
com.google.code.ksoap2-android:ksoap2-android:3.6.1
Here is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.example.papiroomdemo.webservicetest"
minSdkVersion 15
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
repositories {
maven { url 'http://ksoap2-android.googlecode.com/svn/m2-repo' }
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.google.code.ksoap2-android:ksoap2-android:3.6.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.hannesdorfmann.smoothprogressbar:library:1.0.0'
compile 'com.github.castorflex.smoothprogressbar:library-circular:1.0.0'
}
Error:(30, 13) Failed to resolve:
com.google.code.ksoap2-android:ksoap2-android:3.6.1 Show in FileShow in Project Structure
dialog
I think your url in repositories section is invalid. You should add
https://oss.sonatype.org/content/repositories/ksoap2-android-releases/:
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
}
More info here: http://simpligility.github.io/ksoap2-android/getting-started
/// add these lines in module gradle
allprojects {
repositories {
google()
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/'
}
}
}
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'
My Application has two versions of flavors. FREE and PRO. When i generate sind apks, they are both the same size. But when i download them from google play pro version is twice bigger.
Here is my gradle code. If you need anything else to help i will provide.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'me.tatarka.retrolambda'
ext.googleSdkVersion = '10.2.1'
ext.supportLibraryVersion = '25.3.1'
android {
signingConfigs {
sign_config {
keyAlias 'somealias'
keyPassword 'somepass'
storeFile file('../somekeystore.jks')
storePassword 'somepass'
}
}
lintOptions {
disable 'MissingTranslation'
}
dexOptions {
javaMaxHeapSize "4g"
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
multiDexEnabled true
minSdkVersion 21
targetSdkVersion 23
versionCode 35
versionName "2.0.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.sign_config
}
debug {
signingConfig signingConfigs.sign_config
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
productFlavors {
free {
applicationId 'com.my.app'
}
pro {
applicationId 'com.my.apppro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// compile "com.android.support:design:$supportLibraryVersion"
compile "com.android.support:design:$supportLibraryVersion"
compile "com.google.firebase:firebase-core:$googleSdkVersion"
compile "com.google.firebase:firebase-crash:$googleSdkVersion"
compile "com.google.android.gms:play-services-ads:$googleSdkVersion"
compile project(':trimming_helper')
compile 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.j256.ormlite:ormlite-android:4.48'
// for settings help activity
compile 'com.github.chrisbanes:PhotoView:1.3.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.6'
compile 'com.facebook.android:facebook-android-sdk:4.18.0'
compile 'com.afollestad:drag-select-recyclerview:0.4.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.ogaclejapan.smarttablayout:library:1.6.1#aar'
compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1#aar'
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.6.7#aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.6#aar') {
transitive = true;
}
// pin Activity
compile 'com.github.traex.rippleeffect:ripple:1.3.1-OG'
compile 'com.github.omadahealth.typefaceview:typefaceview:1.5.0#aar' //TypefaceTextView
compile 'uk.me.lewisdeane.ldialogs:ldialogs:1.2.0#aar'
//Compat
compile "com.android.support:support-v4:$supportLibraryVersion"
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
compile "com.android.support:support-v13:$supportLibraryVersion"
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.intuit.sdp:sdp-android:1.0.4'
// this for update all support version to last
compile "com.android.support:cardview-v7:$supportLibraryVersion"
compile "com.android.support:customtabs:$supportLibraryVersion"
}
apply plugin: 'com.google.gms.google-services'
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}
I solve the problem , when i upload new apk to google play , there was a check box , for adding obb file (file size was 12 mb) , you can just uncheck and upload apk . that`s it )) Thank you Azizbekian for such a quick reply.
When I try to generate Signed APK, I am getting the following error
Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/gson/annotations/Expose.class
The Debug APK is working perfectly. After I include Facebook SDK then only I am facing this issue... Can anyone help me how to solve this issue
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.21.5'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "mani.com.howhighru"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:10.2.0'
compile 'com.googlecode.json-simple:json-simple:1.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
testCompile 'junit:junit:4.12'
compile('com.twitter.sdk.android:twitter:2.3.1#aar') {
transitive = true;
}
}
The error i got is:
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzqr.class
I have been stuck for hours on this issue.
Here is my Build.Gradle (app file) .
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
buildscript {
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
repositories {
maven { url 'https://maven.fabric.io/public' }
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "org.my.app"
minSdkVersion 19
targetSdkVersion 23
versionCode 140
versionName "1.4.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-location:7.0.0'
// Android SDK
compile 'com.facebook.android:facebook-android-sdk:4.+'
// Audience Network SDK. Only versions 4.6.0 and above are available
compile 'com.facebook.android:audience-network-sdk:4.+'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile 'com.facebook.fresco:fresco:0.9.0+'
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.2#aar') {
transitive = true;
}
}
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}
You are adding the same class with different versions twice.
You are using the Google play services modules with different releases:
Use:
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'