gpt4 book ai didi

安卓 : google-cloud-language library on backend cause appengineEnhance FAILED

转载 作者:行者123 更新时间:2023-11-30 00:42:52 24 4
gpt4 key购买 nike

为了在我的应用后端使用 google-cloud 自然语言,我添加了以下 Gradle 依赖项:

compile 'com.google.cloud:google-cloud-language:0.9.2-alpha'

这导致,当添加时,:

Execution failed for task 'appbackend:appengineEnhance'. An error occurred enhancing DataNucleus classes.

使用 --stacktrace、--debug、--info 运行会给出太多没有任何线索的输出。请感谢您的帮助,因为我在文档中找不到有关如何使用 appengine 正确处理此 google cloud api 的信息。

我后端的完整 gradle 如下:

    buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:1.9.38'
}
}

repositories {
jcenter();
}

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.38'
compile 'com.google.appengine:appengine-endpoints:1.9.38'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.38'
compile 'javax.servlet:servlet-api:2.5'

compile ('com.googlecode.objectify:objectify:5.0.3'){
exclude group: 'com.google.guava'
}
compile 'com.ganyo:gcm-server:1.0.2'

//JBE
compile files('libs/java-json.jar')
compile files('libs/jersey-server-1.1.5.jar') //what is that?
compile files('libs/org.apache.commons.httpclient_3.1.0.v201012070820.jar')
compile files('libs/google-api-services-sqladmin-v1beta1-rev9-1.15.0-rc.jar')


compile 'org.ow2.asm:asm:4.0'
compile 'org.datanucleus:datanucleus-api-jpa:3.1.3'
compile 'org.datanucleus:datanucleus-api-jdo:3.1.3'
compile 'com.google.appengine.orm:datanucleus-appengine:2.1.2'
compile 'org.datanucleus:datanucleus-core:3.1.3'
compile 'org.apache.geronimo.specs:geronimo-jpa_2.0_spec:1.0'
// compile ('javax.jdo:jdo-api:3.0.1')
// compile 'javax.transaction:jta:1.1'

//cloud storage
compile 'com.google.appengine.tools:appengine-gcs-client:0.4.4'
//Google Cloud Natural Language API
compile 'com.google.cloud:google-cloud-language:0.9.2-alpha'
//compile 'com.google.apis:google-api-services-language:v1-rev373-1.22.0'
}

appengine {
downloadSdk = true
appcfg {
oauth2 = true
}
endpoints {
getClientLibsOnBuild = true
getDiscoveryDocsOnBuild = true
}

enhancer {
version = "v2"
api="jpa"
enhanceOnBuild = true
}

}

最佳答案

和往常一样,我觉得 google api 文档很困惑:

介绍了包括 Google Cloud Natural Language API 在内的 Google Cloud API,让您可以在 App Engine 上使用它

http://googlecloudplatform.github.io/google-cloud-java/0.9.2/index.html带有注释“...如果您在 Google App Engine 或 Compute Engine 上运行,则会自动检测私钥...”

但是在 java-docs-samples 中

https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/language/analysis注意到:“注意 App Engine 标准不支持自然语言客户端。”

因此,由于这些库的当前 alpha 状态,希望它是暂时的

关于安卓 : google-cloud-language library on backend cause appengineEnhance FAILED,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42287500/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com