I seem to have solved the immediate compile errors, but would appreciate some deeper insight and have not found anything on StackExchange or Googling the error message that appears directly applicable.
Have been using Android Development Kit plugin for Eclipse for only a few weeks now. I understand that Android only uses syntax through Java 1.5 and suspect that may be a clue to my problem which only occurred after I added a Debug.startMethodTracing("filename.trace");
and added WRITE_EXTERNAL_STORAGE
uses-permissions.
Successfully compiled and ran simple (hello world style) apps, then all of a sudden: bam!!
Brand new error message:
"Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment."
When I checked the Java Build path for my app:
Right click project name > Properties > Java Build Path > Libraries
There were only four items: 1) An imported jar file library (for an API) 2) Android 4.4.2 3) Android Dependencies 4) Android Private Libraries
I seem to have solved the problem by following these non-Android specific instructions:
which essentially said to:
'Add Library" > 'JRE System Library" > "Workspace default JRE (jre7)
and now my code appears to be compiling again. However, I am somewhat uncomfortable with my level of understanding of why it was necessary to do this (I just checked and Jdk1.7 is still in my system path and seemed to work fine before). Is this usually necessary when developing for Android?
In other words, is it normal for a JRE to be explicitly listed in the libraries section with the ADK? Is there any problem with using JRE 1.7 instead of an older version?
I also read these instructions, but again, the answer is not specific to Android: Warning - Build path specifies execution environment J2SE-1.4