AndroidAnnotations 3.0.1.
package com.myapp;
import com.myapp.view.MyView_;
// other imports...
@EActivity(R.layout.start)
public class MyActivity extends Activity {
@ViewById
MyView_ myView;
// using myView
}
And my custom view:
package com.myapp.view;
// imports...
@EView
public class MyView extends TextView {
// ...
}
I have imported my project to Android Studio as Maven project. When I build it from Studio, everything works.
However, when I try to mvn package
it, I get the following error:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /e:/projects/myapp/target/generated-sources/annotations/com/myapp/MyActivity_.java:[80,22] cannot find symbol
symbol: class MyView_
location: class com.myapp.MyActivity_
When I open the MyActivity_.java
generated file, I can see that there are no import for com.myapp.view.MyView_
class (it is there when I build with Studio). Why could that happen?
Compiler configuration:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<annotationProcessors>
<annotationProcessor>org.androidannotations.AndroidAnnotationProcessor</annotationProcessor>
</annotationProcessors>
<compilerArguments>
<AandroidManifestFile>${project.basedir}/src/main/AndroidManifest.xml</AandroidManifestFile>
</compilerArguments>
</configuration>
</plugin>
This does not help.