Hello,

On 2012/08/28 14:11, hwrdprkns wrote:
Atsushi Eno wrote
hwrdprkns wrote:
Jonathan Pryor-2 wrote
I am using the MonoDroid sample for ActionBarSherlock located here, but
I
haven't been able to get to the SherlockFragmentActivity.
The type isn't being bound because the type can't be processed:


http://mono-for-android.1047100.n5.nabble.com/Java-Binding-with-ActionBarSherlock-tp5711097p5711110.html

Consider it a limitation of the current tooling. :-/

Well, I've gotten the type to process and am able to properly link the
code.
However, when I run the code I get a runtime Null Pointer Exception
stating
that com.actionbarsherlock.R$styleable doesn't exist.
You don't get R type when you are dealing with the binding library. R
class is generated only when the app build processes the resources with
aapt internally. R class does not exist in the jar unless you manually
added it (which is wrong, you shouldn't do that otherwise type conflict
occurs in the app build time. If you passed that it is still unexpected
result and can be result in any inconsistency).

Also note that R class is generated for every android library package
you referenced and your app. You're likely seeing missing R because it
is not in com.actionbarsherlock package.

Atsushi Eno


Ah, I see. This makes sense. I was confused about how Mono for Android was
creating the R file. Thank you for clarifying this matter.


A minor clarification: R.java is generated by MfA when you are building your *application*, and it is for every package for each library that needs R class.

This is how Android SDK deals with (Java) Android Library Project and we follow that manner (in 4.2.5; in 4.2.4 we were not really aware of that).

Atsushi Eno

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to