butterknife

java.lang.IllegalStateException Butterknife

你离开我真会死。 提交于 2019-12-05 06:32:50
I am facing java.lang.IllegalStateException Required view 'splash_text' but I have included it in the xml. I am using Butterknife to Bind the views. compile 'com.jakewharton:butterknife:7.0.1' Xml : <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/holo_orange_light"> <com.CustomTextView android:id="@+id/splash_text" android:layout_width="match_parent" android:layout_height="wrap_content" /> <

Butterknife 8.1.0 not working with JDK 1.8 in Android Studio 2.1.2

我怕爱的太早我们不能终老 提交于 2019-12-05 05:45:58
I'm fairly new to Android, Android Studio, Butterknife and the Gradle build system. However, I'm not new to Java, or programming in general. I'm trying to build an Android app with JDK 1.8 and Butterknife version 8.1.0 , but the Gradle build keeps failing, saying: Error:Could not find property 'options' on task ':app:compileDebugJavaWithJack'. Note: My project was working perfectly fine with JDK 1.8 (except for the "Instant Run" functionality) until I tried adding Butterknife. I've already researched a bit on this, and went through the following pages/articles, but couldn't get a definitive

butterknife 10.1.0 核心源码分析

久未见 提交于 2019-12-05 01:58:17
项目结构 butterknife-runtime butterknife butterknife-annotations butterknife-compiler butterknife-gradle-plugin //以下是辅助 butterknife-integration-test butterknife-lint butterknife-reflect 项目依赖图: 如何使用: 1.先在项目根路径 build.gradle 里添加 classpath 'com.jakewharton:butterknife-gradle-plugin:10.1.0' 2.在app module build.gradle 里添加 dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation 'com

Does butterknife 7.x work with Kotlin M14?

对着背影说爱祢 提交于 2019-12-05 01:31:50
I'm trying to use Butterknife with some Kotlin code and also Java code. I know that before M12, there was bad or no support for annotation processing that ButterKnife required. So I have kept my activities in Java. It was working at least in Java with Butterknife 6.x and preM12 Kotlin. I'm trying now butterknife 7.x with M13 and M14. It should have even annotation processing support, but it's not working for me. bind() function doesn't bind anything in my adapter which is written in Java nor in activity written in Kotlin. I'm using this in build.gradle (tried latest version on Github): apply

Proguard Duplicate Zip Entry

匆匆过客 提交于 2019-12-05 01:21:22
I am trying to run my android application through Proguard, however this keeps appearing: Warning:Exception while processing task java.io.IOException: Can't write [C:\Users\Aliaksei\AndroidStudioProjects\SignOutSystem\app\build\intermediates\transforms\proguard\debug\jars\3\1f\main.jar] (Can't read [D:\Users\Aliaksei\.android\build-cache\f7a6034d02d095f18cc21950f131d07fa78b41c0\output\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [android/support/v4/os/j.class == classes.jar:android/support/v4/os/ResultReceiver$MyResultReceiver.class])) I am aware that this means that the android

ButterKnife findByID method is deprecated in version 8.8.0

你说的曾经没有我的故事 提交于 2019-12-05 01:15:06
Hi I have just updated ButterKnife library version 8.7.0 to 8.8.0 compile 'com.jakewharton:butterknife:8.8.0' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.0' and found that: findById(view, id); is deprecated, why? what method to use instead? but when reverting version to 8.7.0 (or earlier) deprecated warning disappears. compileSdkVersion 25 buildToolsVersion "25.0.3" defaultConfig { applicationId "com.some.app" minSdkVersion 21 targetSdkVersion 25 ... Per the change log : Deprecate the findById methods. Compile against API 26 and use the normal findViewById for the same

Butterknife custom view unbind

别等时光非礼了梦想. 提交于 2019-12-05 00:47:37
What's the best practice for calling : - Butterknife.unbind() in a custom Android view please? Wahib Ul Haq Yes, onDetachedFromWindow is the right function as mentioned in NJ's answer because this is where view no longer has a surface for drawing. But the usage is incorrectly mentioned in the answer. The right approach involves binding in onFinishInflate() : @Override protected void onFinishInflate() { super.onFinishInflate(); unbinder = ButterKnife.bind(this); } and unbinding in onDetachedFromWindow : @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); // View is

Using ButterKnife library with 2 different views in 1 fragment

折月煮酒 提交于 2019-12-05 00:13:19
问题 I'm currently trying to use the ButterKnife library for Android to handle some boilerplate code (https://github.com/JakeWharton/butterknife) I've got it set up, and got it semi-working, but i've run into a problem i can't fix :/ I have a Fragment which contains 1 single ListView element, and to this ListView i'm attaching a footer view which contains several elements. This is a code snippet from my fragment using the library: public class UsersFragment extends Fragment { @InjectView(R.id

Eclipse doesn't generate the .apt_generated folder for Butter Knife

微笑、不失礼 提交于 2019-12-04 23:41:14
问题 I have carefully followed the instructions in the official guide to enable annotations in my Eclipse ADT 3.8. That is, Annotation Processing and Factory Path are properly configured: My Android application compiles successfully. It runs too, of course, but I get obvious NPEs due to views that are expected to be initialized by Butter Knife stay null . If I change the configuration to generate, say .apt_generated_foo_bar , Eclipse will create that folder. But empty. Any ideas on how I can

八个最优秀的Android Studio插件

假如想象 提交于 2019-12-04 18:22:18
Android Studio是目前Google官方设计的用于原生Android应用程序开发的IDE。基于JetBrains的IntelliJ IDEA,这是Google I/O 2013第一个宣布的作为Eclipse的继承者,深受广大Android社区的欢迎。在经过漫长的测试阶段后,最终版本于去年12月发布。 Android Studio是一个功能全面的开发环境,装备了为各种设备——从智能手表到汽车——开发Android应用程序所需要的所有功能。不但总是有改进的余地,Android Studio还提供了对第三方插件的支持,下面本文将列出一些最有用的插件。 1. H.A.X.M(硬件加速执行管理器) 如果你想使用Android模拟器更快地执行应用程序,那么H.A.X.M是你的最佳选择。H.A.X.M提供Android SDK模拟器在英特尔系统中的硬件加速。我认为H.A.X.M是最有用的插件,因为它能让Android开发人员尽快地在模拟器上运行最新的Android版本。 安装H.A.X.M 打开Android SDK管理器,选择“Intel x86 Emulator Accelerator (HAXM installer)”,接受许可并安装软件包。 这个进程只是下载软件包,还没有安装。为了完成安装到图片所示的SDK路径C:\Users\Administrator\AppData