我正在尝试开发ANE(Air Native Extension)以使用Facebook SDK。
制作ANE文件后,我尝试运行我的应用程序。
和LogCat说。
"父视图不是文本视图"
这是我的原生代码。
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...
和LogCat消息是..
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
而不是更多。
问题是什么?
请帮帮我。感谢..