From 4f94becd2b7ef922961a171c382124b86540f118 Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 1 Jul 2016 09:30:53 -0600 Subject: [PATCH] Build fails on lint error due to okio dep `./gradlew build` will fail due to a lint error caused by the inclusion of OkHttp/Okio. The error is something like: ``` Invalid package reference in library; not included in Android: java.nio.file. Referenced from okio.Okio. ``` [Issue in the Okio repo documenting this](https://github.com/square/okio/issues/58) along with steps to lower the level of the flag to a "warning", which is what I've done here. Granted, that affects the entire build, not just the one package. [Here's a similar proposed fix for a similar lint error](http://stackoverflow.com/questions/21827004/gradle-dagger-lint-ignore-by-package) via StackOverflow. This should allow someone to clone/download the repo, run `./gradlew build` and have it succeed. I've tested locally and it seems good. --- app/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index ae1f2e4..7e66940 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,6 +17,11 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + // Allow basic build to proceed instead of error-ing due to InvalidPackage warning from Okio. + // Related issue: https://github.com/square/okio/issues/58 + lintOptions { + disable 'InvalidPackage' + } } dependencies {