android-annotations

AndroidAnnotations Eclipse configuration with ADT 23

醉酒当歌 提交于 2019-12-10 07:03:15
问题 Since ADT 23, there seems to have no way to add Annotation Processor Factory Path to projects: No "Annotation Processing" item in Poject>Properties>Java Compiler. Does anyone know how to add androidannotations-X.X.X-api.jar to the annnotaions processing in the last Eclipse ADT? 回答1: This is a known problem of the ADT bundle, and will be fixed as of ADT 23.0.3. In the meantime, you can fix this by downloading a standard Eclipse distribution and installing the ADT plugin to that. Or if you want

Is it possible to inject mocks for testing purposes with AndroidAnnotations?

孤街醉人 提交于 2019-12-09 16:07:27
问题 I haven't found any examples on how to do this. I'm assuming it is not possible based on examples like this: @Bean(MyImplementation.class) MyInterface myInterface; where the class to inject is already determined. 回答1: The question is, are you unit testing or integration testing? If you are unit testing, I would suggest using mocks the old fashioned way, by using a setter and trying to test the Java code without the dependency injection framework involved. This will test your class in

Trying to debug Annotation Processor in android studio end up getting exception

烈酒焚心 提交于 2019-12-07 23:20:44
问题 Using Android Studio 3.1.3 gradle 3.1.2 Runnung Remote build with default config with 5005 port and in gradle.properties file org.gradle.daemon=false org.gradle.jvmargs= -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 always getting error: Error running 'APT': Unable to open debugger port (127.0.0.0:5005): java.net.ConnectException "Operation timed out (Connection timed out)" 回答1: How I made it work - Step 1 Run the below command in the terminal ./gradlew --no-daemon -Dorg

Maven + AndroidAnnotations generated but not reachable classes

时间秒杀一切 提交于 2019-12-07 12:23:08
问题 Alright. I'm attempting to create a project which is perfectly build able by using maven, and maven only. Currently I'm facing this issue of classes being generated, and working fine, as long as there is no reference in actual java code. Meaning, that if I create an example as in the documentation it works. As soon as I do something like Intent i = new Intent(SettingsActivity_); then the build fails with Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile

Adapt AndroidAnnotations Maven settings to Gradle

混江龙づ霸主 提交于 2019-12-07 11:12:36
问题 Is it possible to adapt AndroidAnnotations Maven setup into Gradle? http://code.google.com/p/androidannotations/wiki/MavenEclipse I can't seem to make it work I keep getting com.sun.codemodel#codemodel;2.5-FROZEN-AA: not found So far I have this description = "App" abbreviation = "App" version = '1.0.0.BUILD-SNAPSHOT' buildscript { repositories { mavenRepo name: 'gradle-android-plugin', urls: 'http://jvoegele.com/maven2/' mavenRepo name: 'androidannotations', urls: 'http://repository.excilys

Android Annotations could not find AndroidManifest.xml

∥☆過路亽.° 提交于 2019-12-07 05:25:31
问题 I've checked a few different questions, but none of them provided a solution which worked for me. I'm developing a project with Android Annotations, and when I attempt to build my project it fails with the following error (Project_Location is simply my local project folder): error: Could not find the AndroidManifest.xml file in specified path : [/Project_Location/mobile/build/intermediates/manifests/full/debug/AndroidManifest.xml] Here is my mobile build.gradle file: apply plugin: 'com

androidannotations @AfterViews is not calling and editText is null

好久不见. 提交于 2019-12-07 04:10:04
问题 I have a class and it extends from Fragment. Inside a class my editText is null and @AfterViews is not calling here is my code: @EFragment public class Search extends Fragment { private final String TAG = Search.class.getCanonicalName(); private static ProgressDialog progressDialog; private Activity activity; private ArrayList<String> urlList = new ArrayList<String>(); @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView =

AndroidAnnotations how to add init code after onCreate

你离开我真会死。 提交于 2019-12-07 02:54:53
问题 If I have an activity defined as: @EActivity(R.layout.activity_login) public class LoginActivity extends Activity This will create the onCreate() method for me, but I have extra init code that I want to go after the onCreate method, how should I do this? I could create my own onCreate method and use an empty @EActivity, but is there a better way? 回答1: Use the @AfterViews annotation to define your own initialization code: @AfterViews protected void init() { // your custom code } 来源: https:/

AndroidAnnotations and Dagger

三世轮回 提交于 2019-12-06 22:05:39
问题 I'm trying to use Dagger to inject into an android Annotated Activity. java.lang.IllegalArgumentException: No inject registered for members/com.app.server.AddServerActivity_. You must explicitly add it to the 'injects' option in one of your modules. If I try and Add the com.app.server.AddServerActivity_ to the module I get a diffrent error Error: java.lang.ClassCastException: com.sun.tools.javac.code.Attribute$Error cannot be cast to com.sun.tools.javac.code.Attribute$Class java.lang

Trying to debug Annotation Processor in android studio end up getting exception

橙三吉。 提交于 2019-12-06 10:47:31
Using Android Studio 3.1.3 gradle 3.1.2 Runnung Remote build with default config with 5005 port and in gradle.properties file org.gradle.daemon=false org.gradle.jvmargs= -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 always getting error: Error running 'APT': Unable to open debugger port (127.0.0.0:5005): java.net.ConnectException "Operation timed out (Connection timed out)" How I made it work - Step 1 Run the below command in the terminal ./gradlew --no-daemon -Dorg.gradle.debug=true :app:clean :app:compileDebugJavaWithJavac Step 2 Go to run -> Edit Configurations -> '+'