Appdynamics实施 [英] Appdynamics implementation

查看:352
本文介绍了Appdynamics实施的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想Appdynamics加入到我的应用程序,我做这些步骤:<一href=\"https://docs.appdynamics.com/display/PRO40/Instrument+an+Android+Application#InstrumentanAndroidApplication-ToaddtheAppDynamicsAndroidagentrepositorytoyourproject\" rel=\"nofollow\">https://docs.appdynamics.com/display/PRO40/Instrument+an+Android+Application#InstrumentanAndroidApplication-ToaddtheAppDynamicsAndroidagentrepositorytoyourproject但毕竟我有错误:

I'm trying to add Appdynamics into my application, I'm doing those steps: https://docs.appdynamics.com/display/PRO40/Instrument+an+Android+Application#InstrumentanAndroidApplication-ToaddtheAppDynamicsAndroidagentrepositorytoyourproject but after all I have error:

Error:(15, 13) Failed to resolve: com.appdynamics:appdynamics-runtime:1.0

这是我的build.gradle(对所有项目)的样子:

This is how my build.gradle (for all project) looks like:

buildscript {
  configurations.classpath.resolutionStrategy.force('com.android.tools.build:gradle:1.2.3')
  repositories {
      maven { url uri("adeum-maven-repo") }
      mavenCentral()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:1.2.3', 'com.appdynamics:appdynamics-gradle-plugin:2.0'
  }
}

  allprojects {
    repositories {
        mavenCentral()
  }
}

和的build.gradle(从应用程序模块):

and build.gradle (from app module):

apply plugin: 'adeum'

repositories {
  flatDir {
      dirs 'lib'
  }
  maven {
      url uri('adeum-maven-repo')
  }
}
dependencies {
compile 'com.appdynamics:appdynamics-runtime:1.0'

adeum Maven的回购粘贴到项目中。任何知道我做错了?

and adeum-maven-repo paste into project. Any idea what am I doing wrong?

推荐答案

这是错误意味着gradle这个无法解决的的依赖com.appdynamics:appdynamics运行时。解决这个问题的最简单方法是使用AppDynamics库从行家中心,而不是 adeum Maven的回购目录。为此,您可以通过编辑顶层文件的gradle看起来是这样的:

That error means that gradle is unable to resolve the dependency on com.appdynamics:appdynamics-runtime. The easiest way to fix this problem is to use the AppDynamics libraries from maven central rather than the adeum-maven-repo directory. You can do that by editing your top level gradle file to look like this:

buildscript {
    configurations.classpath.resolutionStrategy.force('com.android.tools.build:gradle:1.2.3')
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
        classpath 'com.appdynamics:appdynamics-gradle-plugin:4.+'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

那么你的项目级文件的gradle看起来像:

Then your project-level gradle file would look like:

apply plugin: 'adeum'

repositories {
    flatDir {
        dirs 'lib'
    }
}

dependencies {
    compile 'com.appdynamics:appdynamics-runtime:4.+'
}

请注意,我已迁到 adeum Maven的回购引用,并改变对AppDynamics神器版本号,因为他们在Maven的中央存在引用它们。一旦你做到了这一点,你不再需要 adeum Maven的回购在您的项目,因为gradle这个现在自动下载这些依赖关系。

Note that I have removed the references to adeum-maven-repo, and changed the version numbers on the AppDynamics artifacts to refer to them as they exist in maven central. Once you've done this, you no longer need adeum-maven-repo in your project, since gradle is now downloading these dependencies automatically.

这篇关于Appdynamics实施的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆