I am trying to create and build an android project with command line tools only (on win7).
so far i succeeded in creating an app and building it with gradle via command line. but i needed to use an external library in my app, named objectbox. after using its classes i am getting gradle error and dont know how to resolve it. i got the debug level messages from gradle with this command:
gradlew assemble --debug
and seems the relevant part that the problem lies starts from this:
01:15:27.177 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository] Detected non-existence of artifact 'com.squareup.okio:okio:1.11.0:okio.jar' in resolver cache
i found the template of resolver cache from a healthy entry like this:
01:15:27.177 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository] Found artifact 'com.google.code.findbugs:jsr305:3.0.2:jsr305.jar' in resolver cache: C:\Users\User.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.2\25ea2e8b0c338a877313bd4672d3fe056ea78f0d\jsr305-3.0.2.jar
and found okio-1.11.0.jar at this path:
C:\Users\User.gradle\caches\modules-2\files-2.1\com.squareup.okio\okio\1.11.0\840897fcd7223a8143f1d9b6f69714e7be34fd50
plus some other relevant dirs and files too.
I made some changes and tests, but no success. please help me find the possible cause and solve this last problem.
and this is the contents of my build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.11.+'
}
}
apply plugin: 'android'
android {
compileSdkVersion 'android-16'
buildToolsVersion '26.0.1'
buildTypes {
release {
runProguard false
proguardFile getDefaultProguardFile('proguard-android.txt')
}
}
}
//=======================================================
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
buildscript {
ext.objectboxVersion = '1.0.1' // check for latest version
repositories {
jcenter()
maven { url "http://objectbox.net/beta-repo/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion"
}
}
allprojects {
repositories {
jcenter()
maven { url "http://objectbox.net/beta-repo/" }
}
}
//==============
apply plugin: 'com.android.application'
apply plugin: 'io.objectbox'