Auth0 gradle依赖性错误

时间:2017-09-14 21:42:23

标签: android authentication gradle

我正在尝试在我的项目中使用Auth0,当我尝试将其包含在build.gradle文件中时,我收到错误。我尝试添加以下内容:

compile 'com.auth0.android:auth0:1.10.0'

compile 'com.auth0.android:auth0:1.+'

我收到以下错误:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs

我跑了gradlew build --stacktrace并得到了这个:

14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:processDebugManifest'.
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Manifest merger failed with multiple errors, see logs
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
14:31:51.285 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger]
14:31:51.286 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED
14:31:51.286 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger]
14:31:51.286 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] Total time: 3.378 secs

我做错了什么?

更新

已打开AndroidManifest.xml,并在Merged Manifest

中找到此消息
Merging Errors: Error: Attribute data@host at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Domain> is provided. app main manifest (this file) Error: Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Scheme> is provided. app main manifest (this file)

1 个答案:

答案 0 :(得分:5)

在这里回答我自己的问题: 合并的清单有错误

Attribute data@host at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Domain> is provided. app main manifest (this file) Error: Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Scheme> is provided. app main manifest (this file)

基本上说auth0Domainauth0Scheme需要声明值。

我需要输入

manifestPlaceholders = [auth0Domain: "@string/com_auth0_domain", auth0Scheme: "demo"]

build.gradle文件中然后编译就好了。

在决定你被卡住之前,基本上遵循说明,those instructions were here