Saya memiliki proyek android sederhana yang saya buat dengan Android Studio 0.4.0. Saya menggunakan Gradle 1.9 dan Gradle Android Plugin 0.7. Kemarin saya telah menambahkan perpustakaan ButterKnife Jake Wharton dalam skrip build gradle saya:
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'
}
Saat saya menjalankan aplikasi dari Android Studio, build berjalan dengan baik dan dieksekusi dengan benar di perangkat saya. Tetapi ketika saya mencoba (dari baris perintah) gradle build
, build gagal. Ini adalah bagian dari laporan lint saya:
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.
Mungkin saya melewatkan sesuatu, tetapi tidak dapat membangun proyek di terminal memblokir kemungkinan CI untuk proyek Android.
Bantuan apa pun akan sangat bagus.
disable 'InvalidPackage'