question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android lint InvalidPackage: javax.naming

See original GitHub issue

What version of gRPC are you using?

1.19.0

Sample project: https://github.com/bubenheimer/grpclint

Running ./gradlew :app:lintDebug triggers errors:

/Users/uli/.gradle/caches/modules-2/files-2.1/io.grpc/grpc-core/1.19.0/48b280ef2c8f42989c65bd61665926c212379660/grpc-core-1.19.0.jar: Error: Invalid package reference in library; not included in Android: javax.naming.directory. Referenced from io.grpc.internal.JndiResourceResolverFactory.JndiRecordFetcher. [InvalidPackage]
/Users/uli/.gradle/caches/modules-2/files-2.1/io.grpc/grpc-core/1.19.0/48b280ef2c8f42989c65bd61665926c212379660/grpc-core-1.19.0.jar: Error: Invalid package reference in library; not included in Android: javax.naming. Referenced from io.grpc.internal.JndiResourceResolverFactory.JndiRecordFetcher. [InvalidPackage]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dapengzhang0commented, Mar 5, 2019

Proguard/dontwarn does not fix lint errors. To suppress the lint error, you may either add lintOptions as in https://github.com/grpc/grpc-java/blob/v1.19.0/examples/android/helloworld/app/build.gradle#L23 in your build.gradle or use lint.xml as in https://github.com/4thline/cling/issues/145#issuecomment-140642446 .

In the mean time, I’m working on adding a @SuppressLint annotation to JndiRecordFetcher to fix the issue.

0reactions
bubenheimercommented, Mar 5, 2019

Thanks, the commit fixes the issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firestore: Invalid package reference in library - Stack Overflow
Seems that the grpc dependency is making lint unhappy. How can I solve this? Google Cloud Collective. android · firebase · gradle ·...
Read more >
Android Lint Checks - Android Studio Project Site
The onClick attribute value should be the name of a method in this View's ... However, due to language changes between Java 7...
Read more >
[Simple-support] Android's Lint reporting "Invalid package ...
To see the problem, go to "Window->Run Android Lint" in Eclipse. I'm using Eclipse 4.2.1and SimpleXML library 2.7. A typical line is: "Invalid...
Read more >
Android – Firestore: Invalid package reference in library – iTecNote
Error: Invalid package reference in library; not included in Android: javax.naming.directory. Referenced from io.grpc.internal.DnsNameResolver.JndiResolver.
Read more >
Lint runs twice as slow on AGP 4 Beta 1 + False Positive
It also throws an error `Error: MyCustomLayout must extend android.view. ... areEqual(Intrinsics.java:162) at org.jetbrains.kotlin.name.FqNamesUtilKt.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found