Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Butterknife causing latest lint build to fail #110

Closed
GabrielCastro opened this issue Mar 7, 2014 · 2 comments
Closed

Butterknife causing latest lint build to fail #110

GabrielCastro opened this issue Mar 7, 2014 · 2 comments

Comments

@GabrielCastro
Copy link

I am in the process of upgrading my projects to the latest version of the gradle android plugin (currently 0.9.0/19.03 with gradle 1.11). Builds within AndroidStudio work properly, but trying to build on the command line fails lint with the following errors

<issue
        id="InvalidPackage"
        severity="Error"
        message="Invalid package reference in library; not included in Android: javax.lang.model.element. Referenced from butterknife.internal.Listener."
        category="Correctness"
        priority="6"
        summary="Finds API accesses to APIs that are not supported in Android"
        explanation="This check scans through libraries looking for calls to APIs that are not included in Android.

When you create Android projects, the classpath is set up such that you can only access classes in the API packages that are included in Android. However, if you add other projects to your libs/ folder, there is no guarantee that those .jar files were built with an Android specific classpath, and in particular, they could be accessing unsupported APIs such as java.applet.

This check scans through library jars and looks for references to API packages that are not included in Android and flags these. This is only an error if your code calls one of the library classes which wind up referencing the unsupported package.">
        <location
            file="C:\Users\User\.gradle\caches\modules-2\files-2.1\com.jakewharton\butterknife\4.0.1\f43b36925363701633d01adb8e54df7150397a78\butterknife-4.0.1.jar"/>
    </issue>

    <issue
        id="InvalidPackage"
        severity="Error"
        message="Invalid package reference in library; not included in Android: javax.lang.model.util. Referenced from butterknife.internal.Listener."
        category="Correctness"
        priority="6"
        summary="Finds API accesses to APIs that are not supported in Android"
        explanation="This check scans through libraries looking for calls to APIs that are not included in Android.

When you create Android projects, the classpath is set up such that you can only access classes in the API packages that are included in Android. However, if you add other projects to your libs/ folder, there is no guarantee that those .jar files were built with an Android specific classpath, and in particular, they could be accessing unsupported APIs such as java.applet.

This check scans through library jars and looks for references to API packages that are not included in Android and flags these. This is only an error if your code calls one of the library classes which wind up referencing the unsupported package.">
        <location
            file="C:\Users\User\.gradle\caches\modules-2\files-2.1\com.jakewharton\butterknife\4.0.1\f43b36925363701633d01adb8e54df7150397a78\butterknife-4.0.1.jar"/>
    </issue>
@GabrielCastro
Copy link
Author

adding

    lintOptions {
        disable 'InvalidPackage'
    }

to build.gradle seems to work

@JakeWharton
Copy link
Owner

Thanks. I'll add it to the website soon.

On Fri, Mar 7, 2014 at 6:08 AM, Gabriel Castro notifications@github.comwrote:

adding

lintOptions {
    disable 'InvalidPackage'
}

to build.gradle seems to work

Reply to this email directly or view it on GitHubhttps://github.com//issues/110#issuecomment-37026616
.

JakeWharton added a commit that referenced this issue Mar 26, 2014
Document Gradle configuration. Closes #110
sahildave referenced this issue in kaushikgopal/rem Sep 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants