ICode9

精准搜索请尝试: 精确搜索
  • android-使用ButterKnife访问导航标题元素2019-10-25 08:37:01

    我有一个处理从RecyclerView选择字符的类,并且一切正常,但是我想用正确的信息更新NavigationView标头中元素的文本.到目前为止,我一直在尝试使用ButterKnife解决此问题,但没有成功.但是,我已经能够以这种方式工作: private ImageView mImageView; private TextViewTitle mTextViewN

  • as3.4+版本有中文用户名配置Butterknife2019-10-15 11:01:21

    更改项目的gradle.properties文件 # Project-wide Gradle settings.# IDE (e.g. Android Studio) users:# Gradle settings configured through the IDE *will override*# any settings specified in this file.# For more details on how to configure your build environment vi

  • Kotlin编译时注解,简单实现ButterKnife2019-10-10 23:58:35

    ButterKnife在之前的Android开发中还是比较热门的工具,帮助Android开发者减少代码编写,而且看起来更加的舒适,于是简单实现一下ButterKnife,相信把下面的代码都搞懂,看ButterKnife的难度就小很多。 今天实现的是编译时注解,其实运行时注解也一样能实现ButterKnife的效果,但是相对于编译时

  • 分分钟带你读懂 ButterKnife 的源码2019-10-10 11:55:07

    为什么要写这一系列的博客呢? 因为在 Android 开发的过程中, 泛型,反射,注解这些知识进场会用到,几乎所有的框架至少都会用到上面的一两种知识,如 Gson 就用到泛型,反射,注解,Retrofit 也用到泛型,反射,注解 。学好这些知识对我们进阶非常重要,尤其是阅读开源框架源码或者自己开发开源框架。

  • android – 无法找到符号类DaggerAppComponent或找不到符号类DaggerActivityComponent2019-10-05 20:25:58

    我在我的类上添加注入后得到这个错误然后它给了我一个编译错误. 如果我删除 @Inject static ApiService mApiService; 它工作正常 我正在使用2个应用程序类扩展MultidexApplication因为我有合并2应用程序首先使用dagger2而第二个应用程序是butterknife并且两个目录结构都是不同的

  • 给定的工件包含一个包含引用“android.support.v4.content”的字符串文字,无法安全地重写.对于androidx2019-09-30 19:28:02

    我将我的android工作室升级到3.4金丝雀,现在由于以下错误我无法再成功构建: The given artifact contains a string literal with a package reference 'android.support.v4.content' that cannot be safely rewritten. Libraries using reflection such as annotation processors

  • android – 为什么butterknife 9.0.0-SNAPSHOT无法解析?2019-09-30 10:34:19

    我想使用AndroidX库,下面是Butterknife的Gradle设置 app:模块依赖 implementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT' annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT' 插入 申请插件:’com.jakewharton.butterknife’ 项目依赖 depende

  • 学习笔记-ButterKnife2019-09-11 13:43:55

    为什么使用?        1. 方便处理adapter里的viewHolder的绑定问题        2. 简化代码,节省开发时间(代替android中对view的相关操作,减少大量的findViewById和setClickListener)        3. 不影响运行性能和效率        4. 代码清晰,可读性强 原理:        利用

  • ButterKnife注解原理分析2019-09-10 17:40:28

    ButterKnife的优点 强大的View绑定和Click事件处理功能,简化繁琐的代码编写 可以支持Adapter中的VIewHolder绑定问题 采用编译时通过注解生成代码,对运行时没有侵入,对比反射方式,效率倍高 代码清晰,可读性强 核心技术 Java Annotation Processing是java中用于编译时扫描和解析

  • 组件化开发中使用ButterKnife的使用2019-09-10 17:01:20

    在组件化开发中Butterknife的使用存在许多的问题,最开始的时候我以为直接引入Butterknife直接引入到项目中就可以了呢!但是后来发现不行,会有各种各样的错误,所以用这篇文章记录一下,防止其他人采坑!!! 先来说一下项目,我们是在公共modules中引入了一些基础组件的!所以我的主要的一些引

  • android – KotterKnife – 不能对某些类使用bindView(R.id.example_id)2019-08-30 03:35:16

    我在尝试使用KotterKnife时遇到以下错误 – 但仅限于某些类.这是怎么回事? e: /Users/user/dev/git/to14/android/src/main/kotlin/com.example/adapters/ChapterListAdapter.kt: (59, 34): Unresolved reference. None of the following candidates is applicable because of rece

  • android – Butterknife与手机和平板电脑的不同布局2019-08-29 14:25:22

    我在当前项目中使用Butterknife库时遇到了一些问题.我目前正在优化手机和平板电脑的项目,例如,两者的布局文件之间有时会略有不同 布局/ layout_example.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"

  • android – ButterKnife如何使用@OnClick参数2019-08-28 17:26:49

    我有一个TextView并通过调用setItem来设置文本 public void setItem(String text){ commentsTextView.setText(text); } 用butterknife应该是这样的: private String mText; public void setItem(String text){ mText = text; } @OnClick(R.id.commentsTextView) prote

  • Butterknife支持的最低Android版本是什么?2019-08-24 11:26:33

    我将Butterknife库添加到我的Android应用程序中.它运行良好的最低Android版本是什么,或者它适用于所有版本的Android?解决方法:minSDK是14.在这里查看 – https://github.com/JakeWharton/butterknife/blob/master/build.gradle ext.versions = [ 'minSdk': 14, 'compileSdk'

  • 安卓黄油刀2019-07-22 20:51:14

    这篇文章就介绍一下,如何在kotlin 中怎么去使用 ButerKnife , 想必在java代码中去使用 ButterKnife 大家都玩的风生水起了,那么在kotlin中怎么去配置呢,怎么去使用KuterKnife呢,可能还有些小伙伴不是很熟悉,那么这里我就在这里介绍一下,如果在Kotlin 中怎么去使用。   正文:        

  • ButterKnife9.0.0-rc2 配置2019-07-22 18:00:27

      升级了AndroidStudio到3.4之后,发现项目中的很多依赖库都不能用,原因是随着AS升级之后,Gradle随之升级到3.4.1,很多第三方库也需要更高版本的支撑,今天遇到ButterKnife失效的问题,原本是8.5.1的版本(基于gradle3.1),提示升级ButterKnife9.0.0-rc2,上网查了一下资料,更改配置步骤如

  • java – butterknife中的方法“onClick”不起作用?2019-07-22 13:27:42

    这是MainActicity: package com.example.a10648.demo; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.Button; import android.widget.Toast; import butterknife.BindView; import butterknife.ButterKnife; import b

  • android – ButterKnife和AnnotationProcessor2019-07-22 10:26:25

    基于ButterKnife lib,我升级到新版本8.5.1.我用了 compile 'com.jakewharton:butterknife:8.5.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' 但它在我的Android Studio 2.3中警告我.并且ButterKnife不起作用(不能绑定视图). Warning:Using incompat

  • Android Studio:ButterKnife 6.1.0重复类:$$查看注入器2019-07-17 13:37:00

    我将项目从Eclipse迁移到AS,因为我遇到了65K方法问题.在解决了我最初在AS面临的每一个依赖性问题之后,我遇到了这个问题,无论我尝试从博客周围的其他类似帖子和SO本身,这个问题似乎都没有消失. 我检查了注释处理器中的启用注释处理,并给出了处理器路径. (甚至尝试从项目类路径中获

  • java – 为什么我在Android Studio 3.0中遇到’com.jakewharton:butterknife:7.0.1’问题?2019-07-12 18:01:19

    当我运行’app'(Android工作室模拟器)时,我遇到以下问题: Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation

  • Android Butterknife简单使用方法,解决添加Butterknife8.8.1依赖后出错的问题,Unable to find method 'com.android.build2019-07-11 16:03:05

    Step one:在Project的 build.gradle 中添加如下代码: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.

  • Butterknife没有从Android Library模块中查找视图2019-07-11 08:27:16

    我的项目中有3个模块:common,admin和client. 第一个是具有抽象LoginActivity的Android库,其他模块(应用程序)可以从中扩展. LoginActivity有自己的布局和实现的所有方法,但是一个:导航到主活动的tryLogin(用户,密码),这对于每个应用程序是不同的. 我已经关注了official documentation

  • 开源框架源码解析系列(3)——ButterKnife源码解析2019-07-08 19:35:47

    ButterKnife是一个专注于Android系统的View注入框架,有了ButterKnife可以很轻松的省去findViewById,ButterKnife用到的注解并不是在运行时反射的,而是在编译的时候生成新的class,对运行时性能没有影响,本篇我们来详细学习一下它的源码。 1.ButterKnife的使用 ButterKnife项目地址

  • 未能在Android Studio和Android 5.0中使用ButterKnife2019-07-06 18:24:19

    我用户使用butterknife来开发我的Android工程师APP并在android 4.4中测试它表现不错. 但是当我在Android 5.0上面的手机中测试时,它总是会抛出如下错误. Caused by: java.lang.RuntimeException: Unable to bind views for com.quinn.githubknife.ui.activity.MainActivity

  • Butterknife的@OnClick方法使用java.lang.BootstrapMethodError崩溃应用程序2019-07-05 12:09:41

    我正在使用Butterknife来简化我的代码. 我在activity_main.xml文件中有一个TextView.我想通过单击此TextView来显示祝酒词但是,当我使用Butterknife库中的@OnClick注释时,我的应用程序崩溃了 MainActivity.java @Override protected void onCreate(Bundle savedInstanceState)

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有