The Android library calls setContentView using its own resource, but does not work with "unable to resolve static field",

I wrote + imported my own library, which includes the OAuth login function. It should call "setContentView (R.layout.authorize)" in its own layout resource authorize.xml , which is defined in the res / layout folder of the library. If I run the library as a normal project (using test activity), everything works fine. However, if I use the library in another project, I get the following error indicating that my authorize.xml layout was not found.

05-17 16:56:10.436: W/dalvikvm(212): VFY: unable to resolve static field 29 (twitter_authorize_webview) in Lcom/skworks/twitter/R$layout;
05-17 16:56:10.436: W/dalvikvm(212): VFY:  rejecting opcode 0x60 at 0x0003
05-17 16:56:10.436: W/dalvikvm(212): VFY:  rejected Lcom/skworks/twitter/AuthorizeActivity;.onCreate (Landroid/os/Bundle;)V
05-17 16:56:10.436: W/dalvikvm(212): Verifier rejected class Lcom/skworks/twitter/AuthorizeActivity;
05-17 16:56:10.436: W/dalvikvm(212): Class init failed in newInstance call (Lcom/skworks/twitter/AuthorizeActivity;)

Here is the code in my main activity

Intent i = new Intent(this, AuthorizeActivity.class);
i.putExtra("URL", mRequestToken.getAuthenticationURL());
this.startActivityForResult(i, TWITTER_AUTH);

, , onCreate AuthorizeActivity, .

setContentView(R.layout.authorize);

, - , , . ?

+3
2

. , jar/apk. , , , apk. .

+2

, android.R. Else, mtmurdock, , , . xml.

0

All Articles