orhanobut / tracklytics

✔️ Annotation based tracking handler with aspect oriented programming
Apache License 2.0
429 stars 45 forks source link

Followed the install instructions in readme...runtime missing error? #33

Closed sirvon closed 7 years ago

sirvon commented 8 years ago
Error:Could not find com.orhanobut.tracklytics:tracklytics-runtime:1.1.23-SNAPSHOT.
Required by:
   MYPROJECT:app:unspecified
<a href="searchInBuildFiles">Search in build.gradle files</a>

I get this error upon building my project with this library included....

orhanobut commented 8 years ago

Can you show me how you added it to the build.gradle file?

sirvon commented 8 years ago

This is the top level build.gradle file....

// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "${rootDir}/gradle/dependencies.gradle"

buildscript {

    apply from: "${rootDir}/gradle/dependencies.gradle"
    repositories {
        maven { url 'https://raw.github.com/Raizlabs/maven-releases/master/releases' }
        maven { url 'https://raw.github.com/xujiaao/mvn-repository/master/releases' }
        maven { url 'http://jitpack.io' }
        maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'}
        maven { url 'http://dl.bintray.com/optimizely/optimizely' }
        maven { url 'http://maven.localytics.com/public' }
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
        maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
        maven { url "http://dl.bintray.com/42matters/android" }
        maven { url 'https://dl.bintray.com/drummer-aidan/maven' }
        maven { url 'https://dl.bintray.com/jjhesk/maven' }
        maven { url 'http://clojars.org/repo/' }
        maven { url 'https://jcenter.bintray.com' }
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots/com/f2prateek/rx/receivers/' }
        //maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
        maven { url 'http://dl.bintray.com/intercom/intercom-maven' }
        maven { url 'https://github.com/tvbarthel/maven/raw/master/' }
        maven { url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo' }
        maven { url 'https://raw.githubusercontent.com/smilefam/SendBird-SDK-Android/master/' }
        maven { url 'https://repo.eclipse.org/content/repositories/paho-snapshots' }
        flatDir { dirs 'libs' }
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0-alpha7'
        classpath 'xalan:xalan:2.7.2'
        classpath "com.neenbedankt.gradle.plugins:android-apt:${plugin_versions.apt}"
        classpath "com.google.gms:google-services:${plugin_versions.googleservices}"
        classpath "me.tatarka:gradle-retrolambda:${plugin_versions.retrolambda}"
        classpath "com.github.Mindera:gradle-slack-plugin:${plugin_versions.slackgradle}"
        classpath "io.realm:realm-gradle-plugin:${plugin_versions.realm}"
        classpath "com.trello:victor:${plugin_versions.victor}"
        classpath "com.jakewharton.hugo:hugo-plugin:${plugin_versions.hugo}"
        classpath "com.orhanobut.tracklytics:tracklytics-plugin:${plugin_versions.analyticAOP}",
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

    configurations.classpath.exclude group: 'com.android.tools.external.lombok'

}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir

}
orhanobut commented 8 years ago

You also need to add into repositories block, either in allprojects or app/build.gradle

maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
sirvon commented 8 years ago

app module level build.gradle

import java.util.regex.Matcher
import java.util.regex.Pattern
buildscript {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    }

    dependencies {
        classpath "com.orhanobut.tracklytics:tracklytics-plugin:${plugin_versions.analyticAOP}"
        classpath "com.jakewharton.hugo:hugo-plugin:${plugin_versions.hugo}"
    }
}
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'com.mindera.gradle.slack'
apply plugin: 'realm-android'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.trello.victor'
apply plugin: 'com.jakewharton.hugo'
apply plugin: 'com.orhanobut.tracklytics'

repositories {
    flatDir{
        dirs 'libs'
        dirs 'aars'
    }
    jcenter()
    mavenCentral()
    maven { url "https://repo.eclipse.org/content/repositories/paho-releases/" }
    maven { url "https://jitpack.io" }
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
    maven { url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo' }
}
orhanobut commented 8 years ago

I added release version, from now on, without SNAPSHOT, it should work properly without adding extra lines