Processing AndroidAnnotations with Maven fails, if not using the FQPN but import statement of a class instead

StackOverflow https://stackoverflow.com/questions/14963233

Question

Processing AndroidAnnotations with Maven (3.0.3) fails, if not using the FQPN but an import statement of a class instead:

This fails:

Note the difference in using the import vs. FQPN in the code, for the reference to the App class, "delta" in my case.

import com.my_project.delta.android.Delta_;

/**
 * Splash screen with logo.
 */
@EActivity(R.layout.act_splash)
public class Splash extends BaseActivity {

    /**
     * Reference to application.
     */
    @App
    protected Delta_ delta;

while this works fine:

/**
 * Splash screen with logo.
 */
@EActivity(R.layout.act_splash)
public class Splash extends BaseActivity {

    /**
     * Reference to application.
     */
    @App
    protected com.my_project.delta.android.Delta_ delta;

Error as below:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project com.my_project.delta.android: Compilation failure
[ERROR] /Users/user/Projects/My-Project/delta-android/target/generated-sources/annotations/com/my_project/delta/android/activity/Splash_.java:[29,19] cannot find symbol
[ERROR] symbol:   class Delta_
[ERROR] location: class com.my_project.delta.android.activity.Splash_
[ERROR] -> [Help 1]

pom.xml: http://pastebin.com/HhxCVYmN

A bug in AndroidAnnotations maybe?

Was it helpful?

Solution

I can see your using the 3.0-SNAPSHOT version. Can you tell me which commit you used to compile the library ? this might be an issue with the last implemented feature.

EDIT: Just saw that your using the generated class. Can you try with this :

@App
Delta delta;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top