Comments (3)
插件会扫描包下的所有类,匿名类也是支持的吧
from laziertracker.
@nailperry-zd
嗯,在自己做的Demo中,MainActivity【类在Android Module中】可以对匿名内部类注入代码。但是除此之外其他的一些Fragment,Activity中并无法注入代码。发现无法注入的类都在AndroidLibrary Module中。
请问:
无法注入的问题,是由于所在Module不同导致的吗?
谢谢!
from laziertracker.
@violinday
class遍历默认只会遍历package包下的所有类,如果要遍历其他的类,需要按照如下配置targetPackages:
codelessdaConfig {
//this will determine the name of this plugin transform, no practical use.
pluginName = 'myPluginTest'
//turn this on to make it print help content, default value is true
showHelp = true
//this flag will decide whether the log of the modifying process be printed or not, default value is false
keepQuiet = false
//this is a kit feature of the plugin, set it true to see the time consume of this build
watchTimeConsume = false
//this is the most important part, 3rd party JAR packages that want our plugin to inject;
//our plugin will inject package defined in 'AndroidManifest.xml' and 'butterknife.internal.butterknife.internal.DebouncingOnClickListener' by default.
//structure is like ['butterknife.internal','com.a.c'], type is HashSet<String>.
//You can also specify the name of the class;
//example: ['com.xxx.xxx.BaseFragment']
targetPackages = []
}
from laziertracker.
Related Issues (20)
- multiple activity declared in src/main/java cause crash HOT 3
- 关于path HOT 1
- rebuild project got error HOT 1
- saveModifiedJarForCheck HOT 1
- 布局文件.xml 里的直接写的android:onClick() 如何做到埋点 HOT 1
- className处理出错 HOT 1
- 弹出的dialog popwindow 怎么埋点 HOT 4
- Return code 1 for dex process HOT 5
- 不能debug的情况有没有遇到啊? HOT 5
- butterknife 注入失败 HOT 1
- AS 3.3.2编译不过
- Execution failed for task ':app:transformClassesWithDexBuilderForDebug'. DEX打包错误
- ButterKnife 注册的onclick 怎么插装? 目前看好像有写但是插入不进去
- view变化的问题
- view变化的问题
- dex数量增加大20几个,每个dex的class数量很少
- Jar修改的时候匹配有问题
- 請問 应用于Android无埋点的Gradle插件解析
- codelessConfig 配置必须要把本地的仓库发布到远端吗 HOT 1
- hook依赖库的jar包没效 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laziertracker.