Ho un semplice progetto Android che ho creato con Android Studio 0.4.0. Uso Gradle 1.9 e Gradle Android Plugin 0.7. Ieri ho aggiunto la libreria ButterKnife di Jake Wharton nel mio script di build gradle:
dependencies {
compile 'com.android.support:support-v4:19.0.0'
compile 'com.android.support:appcompat-v7:19.0.0'
// Butterknife
compile 'com.jakewharton:butterknife:4.0.1'
}
Quando eseguo l'applicazione da Android Studio, la build funziona correttamente e viene eseguita correttamente sui miei dispositivi. Ma quando provo (dalla riga di comando) gradle build
la build fallisce. Ecco una parte del mio rapporto lanugine:
InvalidPackage: Package not included in Android
/home/yami/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/4.0.1/f43b36925363701633d01adb8e54df7150397a78/butterknife-4.0.1.jar: Invalid package reference in library; not included in Android: javax.annotation.processing. Referenced from butterknife.internal.InjectViewProcessor.
/home/yami/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/4.0.1/f43b36925363701633d01adb8e54df7150397a78/butterknife-4.0.1.jar: Invalid package reference in library; not included in Android: javax.annotation.processing. Referenced from butterknife.internal.InjectViewProcessor.
/home/yami/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/4.0.1/f43b36925363701633d01adb8e54df7150397a78/butterknife-4.0.1.jar: Invalid package reference in library; not included in Android: javax.annotation.processing. Referenced from butterknife.internal.InjectViewProcessor.
/home/yami/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/4.0.1/f43b36925363701633d01adb8e54df7150397a78/butterknife-4.0.1.jar: Invalid package reference in library; not included in Android: javax.annotation.processing. Referenced from butterknife.internal.InjectViewProcessor.
/home/yami/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife/4.0.1/f43b36925363701633d01adb8e54df7150397a78/butterknife-4.0.1.jar: Invalid package reference in library; not included in Android: javax.annotation.processing. Referenced from butterknife.internal.InjectViewProcessor.
Forse mi manca qualcosa, ma per non riuscire a costruire il progetto nelle morsettiere la possibilità di CI per progetti Android.
Qualsiasi aiuto sarebbe grande.
disable 'InvalidPackage'