Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6824207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:52:27+00:00 2026-05-26T21:52:27+00:00

I am getting this Error while executing my android application : Host is unresolved:

  • 0

I am getting this Error while executing my android application :

Host is unresolved: api.twitter.com:80
Relevant discussions can be on the Internet at:
http://www.google.co.jp/search?q=10f5ada3 or
http://www.google.co.jp/search?q=dceba048
TwitterException{exceptionCode=[10f5ada3-dceba048 10f5ada3-dceba01e], statusCode=-1, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.5}

Though i have already set proper permissions.. here is my code :

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.abc"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >

            <activity
            android:label="test1"
            android:name=".A1Activity" 
            android:launchMode="singleTask">
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

            <intent-filter>
                           <action android:name="android.intent.action.VIEW" />
                           <category android:name="android.intent.category.DEFAULT" />
                           <category android:name="android.intent.category.BROWSABLE" />
                           <data android:scheme="twitterapp" android:host="callback" />
            </intent-filter>
        </activity>

     <activity class=".screen2" android:label="test2" android:name=".screen2">
      </activity>
    </application>

</manifest>

Code for my file is :

public class A1Activity extends Activity {

         private static final String PREF_ACCESS_TOKEN = "accessToken"; // Called when the activity is first created.      
         private static final String PREF_ACCESS_TOKEN_SECRET = "accessTokenSecret";// Name to store the users access token secret   
         public final static String CONSUMER_KEY = "abc"; // "your key here";
         public final static String CONSUMER_SECRET = "def"; // "your secret key here";     
         private static final String CALLBACK_URL = "twitterapp://callback";// The url that Twitter will redirect to after a user log
         private SharedPreferences mPrefs;     // Preferences to store a logged in users credentials 
         private Twitter mTwitter;// = new TwitterFactory().getInstance(); 
         private RequestToken mReqToken;/** The request token signifies the unique ID of the request you are sending to twitter  */
         public int returnFlag=0;

        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);

                mPrefs = getSharedPreferences("twitterPrefs", MODE_PRIVATE);            
                mTwitter = new TwitterFactory().getInstance();       
                mTwitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET);
                Button mLoginButton = (Button) findViewById(R.id.login_button);
                mLoginButton.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        System.out.println("1");
                        loginNewUser();
                        System.out.println("7.saveAccessToken ");
                        //Intent screenEnterZip = new Intent(A1Activity.this, screen2.class);
                        //startActivity(screenEnterZip);// Perform action on click                
                        }
                    });
                }


        public void loginNewUser() {        
            try { 
                    System.out.println("2");
                    mReqToken = mTwitter.getOAuthRequestToken(CALLBACK_URL);
                    System.out.println("2.1");
                    WebView twitterSite = new WebView(this);
                    System.out.println("2.2");
                    twitterSite.loadUrl(mReqToken.getAuthenticationURL());
                    System.out.println("2.3");
                    setContentView(twitterSite);                
                    //Status status = mTwitter.updateStatus("My First Tweet ... ");                
                    //System.out.println("Successfully updated the status to [" + status.getText() + "].");                
                    System.out.println("1. loginNewUser Completes ");
                }
            catch (TwitterException e) {
                System.out.println("ExceptioniZ "+e);
                Toast.makeText(this, "Twitter Login error, try again later", Toast.LENGTH_SHORT).show();
            }
        }

The app opens in emulator with a screen showing a login button. But on login button click it is throwing regular errors now while the app was working few hours ago…
Can anyone suggest what could have been the problem .. ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:52:28+00:00Added an answer on May 26, 2026 at 9:52 pm

    You probably don’t have an internet connection in your emulator.

    Open up a browser within the emulator and enter “http://api.twitter.com”. This probably won’t work. Do the same on your local pc it should work there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying to host the CLR, I keep getting this: error C2440: 'function' :
Hi i'm new bee to android. while executing my application I'm getting nullpoint exception
I´m getting this error while trying to commit to a svn repository: svn: MKACTIVITY
I keep getting this error while trying to modify some tables. Here's my code:
All of a sudden I start getting this error while trying to open 2
in the aspx page i am getting this error while binding dropdown list Unable
I am using zendgdata library for google calendar. I am getting this error while
I'm Getting this error in my development log while uploadify is uploading the file
It has been quite a while since I am getting this error in the
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.