Start a new topic
Answered

Dependencies problem

 Hi! I'm just following your Getting Started Guide and when you aske me to modify the Gradle dependencies It shows me the error Error:Failed to resolve: :kinvey-android-*. I've just tryied to changed it to kinvey-android-2.10.5 but with no success. Then I changed to

compile(name:'kinvey-android-*', ext:'aar')

and it worked but when I try to run the project I get this error. This is the gradle:


android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.creativeprojects.elbajon"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"

}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
flatDir {
dirs 'libs'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name:'kinvey-android-*', ext:'aar')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
}


com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2


Please help me I'm getting crazy with this. I can't believe I'm just starting with you Kinvey guys and having trouble just yet.




Best Answer

Hi Dan,


Apologies for the trouble you ran into.


Please try the Getting Started guide with Kinvey Android SDK 2.10.4 (http://download.kinvey.com/Android/kinvey-android-2.10.4.zip) and changing your gradle file as below


compile(name:'kinvey-android-2.10.4', ext:'aar')


I believe this should solve the issue you are currently facing.


Regards,

Wani

Kinvey support


Answer

Hi Dan,


Apologies for the trouble you ran into.


Please try the Getting Started guide with Kinvey Android SDK 2.10.4 (http://download.kinvey.com/Android/kinvey-android-2.10.4.zip) and changing your gradle file as below


compile(name:'kinvey-android-2.10.4', ext:'aar')


I believe this should solve the issue you are currently facing.


Regards,

Wani

Kinvey support


1 person likes this

Nice! You were right! That worked! Thanks!

Still not working fore me

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.szaniszlo.saunter"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
flatDir {
dirs 'libs'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

//Kinvey
compile(name:'kinvey-android-2.10.4', ext:'aar')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'

//Google Play and Google+ services
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.google.android.gms:play-services-plus:8.4.0'

//Material designed Navigation Drawer
compile('com.mikepenz:materialdrawer:5.1.3@aar') {
transitive = true
}
//Circle imageView for NavigationDrawer
compile 'de.hdodenhof:circleimageview:1.3.0'

//Icons for NavigationDrawer
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original@aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.5.0.1@aar'
compile 'com.mikepenz:octicons-typeface:3.2.0.1@aar'
compile 'com.mikepenz:meteocons-typeface:1.1.0.1@aar'
compile 'com.mikepenz:community-material-typeface:1.3.41.1@aar'
compile 'com.mikepenz:weather-icons-typeface:2.0.10.1@aar'
compile 'com.mikepenz:typeicons-typeface:2.0.7.1@aar'
compile 'com.mikepenz:entypo-typeface:1.0.0.1@aar'
compile 'com.mikepenz:devicon-typeface:2.0.0.1@aar'
compile 'com.mikepenz:foundation-icons-typeface:3.0.0.1@aar'
compile 'com.mikepenz:ionicons-typeface:2.0.1.1@aar'
}

apply plugin: 'com.google.gms.google-services'

Still not working for me:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.szaniszlo.saunter"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
flatDir {
dirs 'libs'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

//Kinvey
compile(name:'kinvey-android-2.10.4', ext:'aar')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'

//Google Play and Google+ services
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.google.android.gms:play-services-plus:8.4.0'

//Material designed Navigation Drawer
compile('com.mikepenz:materialdrawer:5.1.3@aar') {
transitive = true
}
//Circle imageView for NavigationDrawer
compile 'de.hdodenhof:circleimageview:1.3.0'

//Icons for NavigationDrawer
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original@aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.5.0.1@aar'
compile 'com.mikepenz:octicons-typeface:3.2.0.1@aar'
compile 'com.mikepenz:meteocons-typeface:1.1.0.1@aar'
compile 'com.mikepenz:community-material-typeface:1.3.41.1@aar'
compile 'com.mikepenz:weather-icons-typeface:2.0.10.1@aar'
compile 'com.mikepenz:typeicons-typeface:2.0.7.1@aar'
compile 'com.mikepenz:entypo-typeface:1.0.0.1@aar'
compile 'com.mikepenz:devicon-typeface:2.0.0.1@aar'
compile 'com.mikepenz:foundation-icons-typeface:3.0.0.1@aar'
compile 'com.mikepenz:ionicons-typeface:2.0.1.1@aar'
}

apply plugin: 'com.google.gms.google-services'

Still not working for me, getting the same issue Can not resolve :kinvey-android

Hi András,


Have you followed the steps in http://devcenter.kinvey.com/android/guides/getting-started including copying the jar/aar library files to libs folder? Can you make sure kinvey-android-2.10.4.aar is available in libs folder in the android project?


Additionally, can you comment everything in the build gradle file which is not related to Kinvey and try the build once?


Regards,

Wani

Login or Signup to post a comment