0

I'm trying to develop the ANE(Air Native Extension) to use Facebook SDK.

After making the ANE file, I try to run the my App.

and LogCat says.

"Parent view is not a Text View"

Here is my native code.

public class FBController extends Activity{

private static final String TAG = FBController.class.getSimpleName();

private boolean isResumed = false;
private UiLifecycleHelper _uiHelper;

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "onCreate");

    super.onCreate(savedInstanceState);

    Log.i(TAG, "setContentView");

    setContentView(getResources().getIdentifier("activity_main", "layout", this.getPackageName()));

    Log.i(TAG, "before initiating helper");

    _uiHelper = new UiLifecycleHelper(this, callback);

    Log.i(TAG, _uiHelper.toString());

    Log.i(TAG, "after  initiating helper");

    _uiHelper.onCreate(savedInstanceState);

    Log.i(TAG, "after helper.onCreate");
}

private Session.StatusCallback callback = new Session.StatusCallback() {

    @Override
    public void call(Session session, SessionState state, Exception exception) {
        onSessionStateChange(session, state, exception);
    }
};

... and more...

and LogCat message is..

TAG:FBController  Text:onCreate
TAG:FBController  Text:setContentView
TAG:FBController  Text:Parent view is not a TextView
TAG:FBController  Text:before initiating helper
TAG:FBController  Text:com.facebook.UILifecycleHelper@42b4e330
TAG:FBController  Text:after initiating helper
TAG:FBController  Text:after helper.onCreate

and not more.

What is the problem??

Please help me. thanks..

matiash
  • 54,791
  • 16
  • 125
  • 154
Cloud Lee
  • 23
  • 1
  • 4
  • Have you tried `setContentView(R.layout.activity_main);` instead of `setContentView(getResources().getIdentifier("activity_main", "layout", this.getPackageName()));`? – matiash Jun 20 '14 at 02:49
  • When I used R.mechanism, I couldn't use the R.layout... in adobe air App. therefore I can't help using like that. If the problem is caused by that, I will try to do other ways.. Thanks !! – Cloud Lee Jun 20 '14 at 05:47

0 Answers0