Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualjellomaj

Posted 09 April 2013 - 04:36 PM

Double-check that import android.app.LoaderManager does not appear in any of your files.  After verifying that it isn't present, rebuild the files.

 

 

If the problem still persists, post the relevant updated code.

MainActivity is the only activity present in my app, so import android.app.LoaderManager is not written anywhere else.

Could it be because my target sdk version is 16? My minimum sdk version is 10. I doubt it, since changing those values doesn't fix the errors.

 

Here's the code for my main activity. I removed anything that didn't have to do with the problem. Tell me if you want the whole thing:

import oauth.signpost.OAuth;
import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.commonshttp.CommonsHttpOAuthProvider;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.Loader;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.content.AsyncTaskLoader;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.support.v4.app.LoaderManager;
//import android.app.LoaderManager;

public class MainActivity extends Activity implements android.support.v4.app.LoaderManager.LoaderCallbacks{

	final String TAG = getClass().getName();
	
	private OAuthConsumer consumer;
        private OAuthProvider provider;
        private String token;
        private String secret;
        private Loader<OAuthConsumer> consumerLoader;
    
        Activity context;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_main);
		
	    Button signInButton = (Button) findViewById(R.id.signInButton);
        
            signInButton.setOnClickListener(new View.OnClickListener() {
			
	        public void onClick(View v) {
	        	// TODO Auto-generated method stub
	    	    sign_in();
	        }
	    });		
	}

	public void sign_in()
        {
    	    try {
    	        this.consumer = (OAuthConsumer) new getCommonsHttpOAuthConsumer(context);    	    
    	    } catch (Exception e) {
    	        Log.e(TAG, "Error creating consumer / provider",e);
    	    }    	
        }
    
    
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
	    // Inflate the menu; this adds items to the action bar if it is present.
	    getMenuInflater().inflate(R.menu.activity_main, menu);
	    return true;
	}
	
	
	@Override
        public Loader<OAuthConsumer> onCreateLoader(int id, Bundle arg1) {
            consumerLoader = new getCommonsHttpOAuthConsumer();
            return consumerLoader;
        }
	
	
}


class getCommonsHttpOAuthConsumer extends AsyncTaskLoader<OAuthConsumer>{

	public getCommonsHttpOAuthConsumer(Context context) {
	    super(context);
	    // TODO Auto-generated constructor stub
	}

	@Override
	public OAuthConsumer loadInBackground() {
	    // TODO Auto-generated method stub
		
	    return new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);
	}
	
}

#6jellomaj

Posted 09 April 2013 - 04:36 PM

Double-check that import android.app.LoaderManager does not appear in any of your files.  After verifying that it isn't present, rebuild the files.

 

 

If the problem still persists, post the relevant updated code.

MainActivity is the only activity present in my app, so import android.app.LoaderManager is not written anywhere else.

Could it be because my target sdk version is 16? My minimum sdk version is 10. I doubt it, since changing those values doesn't fix the errors.

 

Here's the code for my main activity. I removed anything that didn't have to do with the problem. Tell me if you want the whole thing:

import oauth.signpost.OAuth;
import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.commonshttp.CommonsHttpOAuthProvider;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.Loader;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.content.AsyncTaskLoader;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.support.v4.app.LoaderManager;
//import android.app.LoaderManager;

public class MainActivity extends Activity implements android.support.v4.app.LoaderManager.LoaderCallbacks{

	final String TAG = getClass().getName();
	
	private OAuthConsumer consumer;
        private OAuthProvider provider;
        private String token;
        private String secret;
        private Loader<OAuthConsumer> consumerLoader;
    
        Activity context;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_main);
		
	    Button signInButton = (Button) findViewById(R.id.signInButton);
        
            signInButton.setOnClickListener(new View.OnClickListener() {
			
	        public void onClick(View v) {
	        	// TODO Auto-generated method stub
	    	    sign_in();
	        }
	    });		
	}

	public void sign_in()
        {
    	    try {
    	        this.consumer = (OAuthConsumer) new getCommonsHttpOAuthConsumer(context);    	    
    	    } catch (Exception e) {
    	        Log.e(TAG, "Error creating consumer / provider",e);
    	    }    	
        }
    
    
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
	    // Inflate the menu; this adds items to the action bar if it is present.
	    getMenuInflater().inflate(R.menu.activity_main, menu);
	    return true;
	}
	
	
	@Override
        public Loader<OAuthConsumer> onCreateLoader(int id, Bundle arg1) {
            consumerLoader = new getCommonsHttpOAuthConsumer();
            return consumerLoader;
        }
	
	
}


class getCommonsHttpOAuthConsumer extends AsyncTaskLoader<OAuthConsumer>{

	public getCommonsHttpOAuthConsumer(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}

	@Override
	public OAuthConsumer loadInBackground() {
		// TODO Auto-generated method stub
		
		return new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);
	}
	
}

#5jellomaj

Posted 09 April 2013 - 04:35 PM

Double-check that import android.app.LoaderManager does not appear in any of your files.  After verifying that it isn't present, rebuild the files.

 

 

If the problem still persists, post the relevant updated code.

MainActivity is the only activity present in my app, so import android.app.LoaderManager is not written anywhere else.

Could it be because my target sdk version is 16? My minimum sdk version is 10. I doubt it, since changing those values doesn't fix the errors.

 

Here's the code for my main activity. I removed anything that didn't have to do with the problem. Tell me if you want the whole thing:

import oauth.signpost.OAuth;
import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.commonshttp.CommonsHttpOAuthProvider;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.Loader;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.content.AsyncTaskLoader;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.support.v4.app.LoaderManager;
//import android.app.LoaderManager;

public class MainActivity extends Activity implements android.support.v4.app.LoaderManager.LoaderCallbacks{

	final String TAG = getClass().getName();
	
	private OAuthConsumer consumer;
        private OAuthProvider provider;
        private String token;
        private String secret;
        private Loader<OAuthConsumer> consumerLoader;
    
        Activity context;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_main);
		
	    Button signInButton = (Button) findViewById(R.id.signInButton);
        
            signInButton.setOnClickListener(new View.OnClickListener() {
			
	        public void onClick(View v) {
	        	// TODO Auto-generated method stub
	    	    sign_in();
	        }
	    });		
	}

	public void sign_in()
        {
    	    try {
    	        this.consumer = (OAuthConsumer) new getCommonsHttpOAuthConsumer(context);    	    
    	    } catch (Exception e) {
    	    Log.e(TAG, "Error creating consumer / provider",e);
    	    }    	
        }
    
    
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
	    // Inflate the menu; this adds items to the action bar if it is present.
	    getMenuInflater().inflate(R.menu.activity_main, menu);
	    return true;
	}
	
	
	@Override
        public Loader<OAuthConsumer> onCreateLoader(int id, Bundle arg1) {
            consumerLoader = new getCommonsHttpOAuthConsumer();
            return consumerLoader;
        }
	
	
}


class getCommonsHttpOAuthConsumer extends AsyncTaskLoader<OAuthConsumer>{

	public getCommonsHttpOAuthConsumer(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}

	@Override
	public OAuthConsumer loadInBackground() {
		// TODO Auto-generated method stub
		
		return new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);
	}
	
}

#4jellomaj

Posted 09 April 2013 - 04:35 PM

Double-check that import android.app.LoaderManager does not appear in any of your files.  After verifying that it isn't present, rebuild the files.

 

 

If the problem still persists, post the relevant updated code.

MainActivity is the only activity present in my app, so import android.app.LoaderManager is not written anywhere else.

Could it be because my target sdk version is 16? My minimum sdk version is 10. I doubt it, since changing those values doesn't fix the errors.

 

Here's the code for my main activity. I removed anything that didn't have to do with the problem. Tell me if you want the whole thing:

import oauth.signpost.OAuth;
import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.commonshttp.CommonsHttpOAuthProvider;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.Loader;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.content.AsyncTaskLoader;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.support.v4.app.LoaderManager;
//import android.app.LoaderManager;

public class MainActivity extends Activity implements android.support.v4.app.LoaderManager.LoaderCallbacks{

	final String TAG = getClass().getName();
	
	private OAuthConsumer consumer;
        private OAuthProvider provider;
        private String token;
        private String secret;
        private Loader<OAuthConsumer> consumerLoader;
    
        Activity context;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_main);
		
	    Button signInButton = (Button) findViewById(R.id.signInButton);
        
            signInButton.setOnClickListener(new View.OnClickListener() {
			
	        public void onClick(View v) {
	        	// TODO Auto-generated method stub
	    	    sign_in();
	        }
	    });		
	}

	public void sign_in()
        {
    	    try {
    	        this.consumer = (OAuthConsumer) new getCommonsHttpOAuthConsumer(context);    	    
    	    } catch (Exception e) {
    	    Log.e(TAG, "Error creating consumer / provider",e);
    	    }    	
        }
    
    
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	
	
	@Override
        public Loader<OAuthConsumer> onCreateLoader(int id, Bundle arg1) {
            consumerLoader = new getCommonsHttpOAuthConsumer();
            return consumerLoader;
        }
	
	
}


class getCommonsHttpOAuthConsumer extends AsyncTaskLoader<OAuthConsumer>{

	public getCommonsHttpOAuthConsumer(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}

	@Override
	public OAuthConsumer loadInBackground() {
		// TODO Auto-generated method stub
		
		return new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);
	}
	
}

#3jellomaj

Posted 09 April 2013 - 04:34 PM

Double-check that import android.app.LoaderManager does not appear in any of your files.  After verifying that it isn't present, rebuild the files.

 

 

If the problem still persists, post the relevant updated code.

MainActivity is the only activity present in my app, so import android.app.LoaderManager is not written anywhere else.

Could it be because my target sdk version is 16? My minimum sdk version is 10. I doubt it, since changing those values doesn't fix the errors.

 

Here's the code for my main activity. I removed anything that didn't have to do with the problem. Tell me if you want the whole thing:

import oauth.signpost.OAuth;
import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.commonshttp.CommonsHttpOAuthProvider;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.Loader;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.content.AsyncTaskLoader;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.support.v4.app.LoaderManager;
//import android.app.LoaderManager;

public class MainActivity extends Activity implements android.support.v4.app.LoaderManager.LoaderCallbacks{

	final String TAG = getClass().getName();
	
	private OAuthConsumer consumer;
        private OAuthProvider provider;
        private String token;
        private String secret;
        private Loader<OAuthConsumer> consumerLoader;
    
        Activity context;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_main);
		
	    Button signInButton = (Button) findViewById(R.id.signInButton);
        
            signInButton.setOnClickListener(new View.OnClickListener() {
			
	        public void onClick(View v) {
	        	// TODO Auto-generated method stub
	    	    sign_in();
	        }
	    });		
	}

	public void sign_in()
        {
    	    try {
    	        this.consumer = (OAuthConsumer) new getCommonsHttpOAuthConsumer(context);    	    
    	    } catch (Exception e) {
    	    Log.e(TAG, "Error creating consumer / provider",e);
    	    }    	
        }
    
    
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	
	
	@Override
        public Loader<OAuthConsumer> onCreateLoader(int id, Bundle arg1) {
        consumerLoader = new getCommonsHttpOAuthConsumer();
        return consumerLoader;
        }
	
	
}


class getCommonsHttpOAuthConsumer extends AsyncTaskLoader<OAuthConsumer>{

	public getCommonsHttpOAuthConsumer(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}

	@Override
	public OAuthConsumer loadInBackground() {
		// TODO Auto-generated method stub
		
		return new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);
	}
	
}

#2jellomaj

Posted 09 April 2013 - 04:28 PM

Double-check that import android.app.LoaderManager does not appear in any of your files.  After verifying that it isn't present, rebuild the files.

 

 

If the problem still persists, post the relevant updated code.

MainActivity is the only activity present in my app, so import android.app.LoaderManager is not written anywhere else.

Could it be because my target sdk version is 16? My minimum sdk version is 10. I doubt it, since changing those values doesn't fix the errors.

 

Here's the code for my main activity. I removed anything that didn't have to do with the problem. Tell me if you want the whole thing:

import oauth.signpost.OAuth;
import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.commonshttp.CommonsHttpOAuthProvider;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.Loader;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.content.AsyncTaskLoader;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.support.v4.app.LoaderManager;
//import android.app.LoaderManager;

public class MainActivity extends Activity implements android.support.v4.app.LoaderManager.LoaderCallbacks{

	final String TAG = getClass().getName();
	
	private OAuthConsumer consumer;
    private OAuthProvider provider;
    private String token;
    private String secret;
    private Loader<OAuthConsumer> consumerLoader;
    
    Activity context;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		Button signInButton = (Button) findViewById(R.id.signInButton);
        
        signInButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// TODO Auto-generated method stub
				sign_in();
			}
		});		
	}

	
	public void sign_in()
    {
    	try {
    	     this.consumer = (OAuthConsumer) new getCommonsHttpOAuthConsumer(context);    	    
    	     } catch (Exception e) {
    	     Log.e(TAG, "Error creating consumer / provider",e);
    	}    	
    }
    
    
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	
	
	@Override
    public Loader<OAuthConsumer> onCreateLoader(int id, Bundle arg1) {
        consumerLoader = new getCommonsHttpOAuthConsumer();
        return consumerLoader;
    }
	
	
}


class getCommonsHttpOAuthConsumer extends AsyncTaskLoader<OAuthConsumer>{

	public getCommonsHttpOAuthConsumer(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
	}

	@Override
	public OAuthConsumer loadInBackground() {
		// TODO Auto-generated method stub
		
		return new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);
	}
	
}

PARTNERS