I have 2 android projects:
- 1 library project used as an API in several other projects and generating an apklib
- 2 android projects using this apklib
In my apklib project I have in one layout a referenced spinner R.id.mySpinner
I have one androidproject compiling well in eclipse and maven (using mvn clean install). Remark: This first projects use also in one layout the same reference on a spinner R.id.mySpinner.
The second android project compiles well under eclipse but when compiling with maven I have following ERROR:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project myproject: Compilation failure: Compilation failure:
[ERROR] /mypath/target/unpack/apklibs/mylibpackage/src/pathtoactivity/BaseActivity.java:[302,79] cannot find symbol
[ERROR] symbol: variable mySpinner
[ERROR] location: class mypackage.R.id
I noted that as said by the compiler the R generated by maven compiler in directory ..\target\generated-sources\r\mypackage\R.java do not contains mySpinner reference unlike in the project compiling well.
Remark: This second project DO NOT have any reference to R.id.mySpinner in any of its class or layout.
So here am I, I don't know were to search anymore. The only difference I noted between the two projects is the remarked noted above. I don't know what's the diffrence beween the eclipse compilation and the mvn compilation either.
Someone has ever encontered such a problem? Or do you have a tip to find somewhere information setting me on the way to the solution?