0

目前在https://github.com/lucasr/probe的一个分支上工作。刚开始,但由于某种原因,当我尝试构建它时,我多次收到此错误:

/Users/me/probe/library/src/main/java/org/lucasr/probe/DexProxyBuilder.java:27: error: package com.google.dexmaker does not exist
import com.google.dexmaker.Code;

我真的不知道这是怎么回事,因为库项目的 build.gradle 有:

dependencies {
    compile 'com.google.dexmaker:dexmaker:1.2'
}

编辑:满build.gradle

apply plugin: 'com.android.library'
apply plugin: 'maven'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 19
    buildToolsVersion "21.1.2"
}

dependencies {
    compile 'com.google.dexmaker:dexmaker:1.2'
}

apply from: "${rootDir}/gradle/scripts/gradle-mvn-push.gradle"

afterEvaluate { project ->
    uploadArchives {
        repositories {
            mavenDeployer {
                pom.whenConfigured {
                    def dep = dependencies.find { it.groupId == 'com.google.dexmaker' }
                    dep.optional = true
                    dep.scope = null
                }
            }
        }
    }
}
4

1 回答 1

0

dexmaker Github 说:

Gradle 用户可以通过以下方式导入项目:

testCompile "com.crittercism.dexmaker:dexmaker:1.4"
testCompile "com.crittercism.dexmaker:dexmaker-dx:1.4"
testCompile "com.crittercism.dexmaker:dexmaker-mockito:1.4"
于 2016-10-20T20:13:48.390 回答