错误:CursorWrapperInner(10908):光标在没有事先关闭()的情况下完成
我一直试图让Facebook代码与我的应用程序一起使用.出于某种原因甚至样本都会出现此错误?我不知道为什么,但这里是我的片段,我得到了同样的错误,如上所述.
码:
package com.fragments;
public class MainDisplayFragment extends Fragment {
private static final String TAG = "MainFragment";
private UiLifecycleHelper uiHelper;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.main_display_fragment, container,
false);
uiHelper = new UiLifecycleHelper(this.getActivity(), callback);
uiHelper.onCreate(savedInstanceState);
// Facebook login button.
LoginButton authButton = (LoginButton) view
.findViewById(R.id.authButton);
authButton.setFragment(this);
// Set Application ID.
authButton.setReadPermissions(Arrays.asList("user_friends",
"user_about_me", "user_birthday", "user_likes", "user_status"));
return view;
}
private void onSessionStateChange(Session session, SessionState state,
Exception …Run Code Online (Sandbox Code Playgroud) 我只是不确定为什么我replaceWord根本没有进入文件我已经使用了所有注释掉的等等.我只是试图用从命令行参数收到的文本替换.我知道我可能很遥远我只是在寻找一种相对简单的方法.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ( int argc, char *argv[] )
{
if ( argc != 4 ) /* argc should be 2 for correct execution */
{
/* We print argv[0] assuming it is the program name */
printf( "usage: %s filename\n", argv[0] );
}
else
{
// We assume argv[1] is a filename to open
char* wordReplace = argv[1];
char* replaceWord = argv[2];
FILE *file = fopen( argv[3], "r" );
/* fopen …Run Code Online (Sandbox Code Playgroud)