kaname-png
kaname-png

Reputation: 127

Because when I use the dependency of Firebase Firestore in my Android application I get an error?

Every time I try to compile my APK or use the command /lintdebug (I'm a Windows user) I get an error. I know I can skip this problem by adding a few lint configuration lines in my build.gradle, but I would like to have my project clean, with no errors or warnings.

Check that it is because of Firebase Firestore's dependence because when I remove it from my dependencies list the error disappears.

This is the mistake I have, I hope someone can help me.

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

Upvotes: 1

Views: 198

Answers (1)

Ranjan Kumar
Ranjan Kumar

Reputation: 1210

This issue is fixed in grpc 1.20.0. Modify your app/build.gradle to include this version of grpc in dependency list.

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'
}

Upvotes: 1

Related Questions