Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/391.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 因为当我在我的Android应用程序中使用Firebase Firestore的依赖项时,我得到了一个错误?_Java_Android_Firebase_Android Gradle Plugin - Fatal编程技术网

Java 因为当我在我的Android应用程序中使用Firebase Firestore的依赖项时,我得到了一个错误?

Java 因为当我在我的Android应用程序中使用Firebase Firestore的依赖项时,我得到了一个错误?,java,android,firebase,android-gradle-plugin,Java,Android,Firebase,Android Gradle Plugin,每次我尝试编译APK或使用命令/lintdebug(我是Windows用户)时,我都会收到一个错误。我知道我可以通过在build.gradle中添加一些lint配置行来跳过这个问题,但我希望我的项目干净,没有错误或警告。 检查是否是因为Firebase Firestore的依赖关系,因为当我将其从依赖关系列表中删除时,错误消失 这是我的错误,我希望有人能帮助我 C:\Users\itzThiefz.exe\AndroidStudioProjects\RavenNetwork>gradlew

每次我尝试编译APK或使用命令/lintdebug(我是Windows用户)时,我都会收到一个错误。我知道我可以通过在build.gradle中添加一些lint配置行来跳过这个问题,但我希望我的项目干净,没有错误或警告。

检查是否是因为Firebase Firestore的依赖关系,因为当我将其从依赖关系列表中删除时,错误消失

这是我的错误,我希望有人能帮助我

C:\Users\itzThiefz.exe\AndroidStudioProjects\RavenNetwork>gradlew lintdebug

> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

> Task :app:processDebugGoogleServices
Parsing json file: C:\Users\itzThiefz.exe\AndroidStudioProjects\RavenNetwork\app\google-services.json

> Task :app:lintDebug
Wrote HTML report to file:///C:/Users/itzThiefz.exe/AndroidStudioProjects/RavenNetwork/app/build/reports/lint-results-debug.html
Wrote XML report to file:///C:/Users/itzThiefz.exe/AndroidStudioProjects/RavenNetwork/app/build/reports/lint-results-debug.xml

> Task :app:lintDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintDebug'.
> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, or add the following to your build script to proceed with errors:
  ...
  android {
      lintOptions {
          abortOnError false
      }
  }
  ...

  Errors found:

  C:\Users\itzThiefz.exe\.gradle\caches\modules-2\files-2.1\io.grpc\grpc-core\1.16.1\8a938ece0ad8d8bf77d790c502ba51ebec114aa9\grpc-core-1.16.1.jar: Error: Invalid package reference in li
brary; not included in Android: javax.naming.directory. Referenced from io.grpc.internal.JndiResourceResolverFactory.JndiResourceResolver. [InvalidPackage]
  C:\Users\itzThiefz.exe\.gradle\caches\modules-2\files-2.1\io.grpc\grpc-core\1.16.1\8a938ece0ad8d8bf77d790c502ba51ebec114aa9\grpc-core-1.16.1.jar: Error: Invalid package reference in li
brary; not included in Android: javax.naming. Referenced from io.grpc.internal.JndiResourceResolverFactory.JndiResourceResolver. [InvalidPackage]



* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 30s
15 actionable tasks: 2 executed, 13 up-to-date


此问题已在grpc 1.20.0中修复。修改您的app/build.gradle,将此版本的grpc包含在依赖项列表中

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'io.grpc:grpc-core:1.20.0'
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

你能给我一个如何添加这种依赖关系的例子吗?