Hi, Im tryin to create my own Android-Programm connecting to my Core and my 5 Photons.
Some Problems i have already solved, so they may help others with Ubuntu 14.04:
- in Ubuntu install Java8
- Install Eclipse Mars from the Eclipse Website (not from Ubuntu repositories)
- in Eclipse install Eclipse Android-Plugin
- in Eclipse use Android SDK Manager to install latest Android SDK-Tools and Librarys
- in Eclipse install Gradle Plugin for Eclipse
- Install Gradle 2.6 from Gradle-Website (don´t use Gradle from Ubuntu Repositories. This is Version 1.7 and did not work)
But now my Problem:
In Eclipse there seems no SparkCloud included in Java, and gradle shows following Error:
> gradle dependencies
Executing task ':dependencies' (up-to-date check took 0.028 secs) due to:
Task.upToDateWhen is false.
------------------------------------------------------------
Root project
------------------------------------------------------------
archives - Configuration for archive artifacts.
No dependencies
compile - Compile classpath for source set 'main'.
Resource missing. [HTTP GET: https://repo1.maven.org/maven2/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom]
Resource missing. [HTTP HEAD: https://repo1.maven.org/maven2/com/android/support/support-v4/22.2.0/support-v4-22.2.0.jar]
Resource missing. [HTTP GET: https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.pom]
Resource missing. [HTTP HEAD: https://jcenter.bintray.com/com/android/support/support-v4/22.2.0/support-v4-22.2.0.jar]
+--- commons-collections:commons-collections:3.2
\--- io.particle:cloudsdk:0.1.3
+--- com.google.guava:guava:18.0
+--- com.android.support:support-v4:22.2.0 FAILED
+--- com.squareup.okio:okio:1.4.0
+--- org.apache.commons:commons-lang3:3.3.2
+--- com.google.code.gson:gson:2.3.1
+--- com.squareup.okhttp:okhttp:2.3.0
| \--- com.squareup.okio:okio:1.3.0 -> 1.4.0
\--- com.squareup.retrofit:retrofit:1.9.0
\--- com.google.code.gson:gson:2.3.1
And true to this Statement ist that my Library from Android is indeed not
±-- com.android.support:support-v4:22.2.0 FAILED
but i only can get v 22.2.1 with Android SDK Manager today
I had to set
export ANDROID_HOME=/opt/android-studio/sdk
So i tried some more, and here is my gradle.build
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'eclipse'
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
testCompile group: 'junit', name: 'junit', version: '4.+'
compile 'io.particle:cloudsdk:0.1.3'
compile fileTree(dir: 'libs', include: '*.jar', exclude: 'android-support-*.jar')
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
androidTest.setRoot('tests')
}
lintOptions {
abortOnError false
}
}
Andreas 8)