Attention to the use of dagger2 in AS3.0


You should have noticed that with the continuous upgrading of AS tools, the use of some tools has changed. Now let’s summarize the details that dagger2 should pay attention to when using AS3.0:

AS2.0 way:
compile 'com.google.dagger:dagger:2.4'
apt 'com.google.dagger:dagger-compiler:2.4' ----------"The apt to be replaced in AS 3.0 is replaced by annotationProcessor
 compile 'org .glassfish:javax.annotation:10.0-b28'

 
Solve the use method from AS2.0 to AS3.0
 1. Delete the classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' in the build.gradle in the project directory;
 2. Put the specific Module directory The apply plugin in the build.gradle: 'com.neenbedankt.android-apt' is deleted;
 3. At the same time, change the original use of apt in dependencies to annotationProcessor, and then Sync Now.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324727641&siteId=291194637