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 8772561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:03:50+00:00 2026-06-13T18:03:50+00:00

I don’t figure out why it return to me this errors, please help me!!

  • 0

I don’t figure out why it return to me this errors, please help me!! 🙁
This are errors:

10-31 15:33:28.595: E/Trace(7356): error opening trace file: No such file or directory (2)
10-31 15:33:29.125: E/AndroidRuntime(7356): FATAL EXCEPTION: main
10-31 15:33:29.125: E/AndroidRuntime(7356): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.appuniradiocesena/com.example.appuniradiocesena.SwipeyTabsSampleActivity}: java.lang.NullPointerException
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.app.ActivityThread.access$600(ActivityThread.java:140)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.os.Looper.loop(Looper.java:137)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.app.ActivityThread.main(ActivityThread.java:4898)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at java.lang.reflect.Method.invokeNative(Native Method)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at java.lang.reflect.Method.invoke(Method.java:511)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at dalvik.system.NativeStart.main(Native Method)
10-31 15:33:29.125: E/AndroidRuntime(7356): Caused by: java.lang.NullPointerException
10-31 15:33:29.125: E/AndroidRuntime(7356):     at com.example.appuniradiocesena.SwipeyTabsSampleActivity.onCreate(SwipeyTabsSampleActivity.java:77)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.app.Activity.performCreate(Activity.java:5184)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
10-31 15:33:29.125: E/AndroidRuntime(7356):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
10-31 15:33:29.125: E/AndroidRuntime(7356):     ... 11 more

and this is my first class when it run:

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.TimerTask;

import net.moraleboost.streamscraper.ScrapeException;
import net.moraleboost.streamscraper.Scraper;
import net.moraleboost.streamscraper.Stream;
import net.moraleboost.streamscraper.scraper.IceCastScraper;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.StrictMode;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

public class SwipeyTabsSampleActivity extends FragmentActivity {
private Button streamButton;

private ImageButton playButton;

private TextView textStreamed;
private TextView textSong;

private boolean isPlaying;

private StreamingMediaPlayer audioStreamer;

private SwipeyTabs mTabs;
private ViewPager mViewPager;

private static final String [] TITLES = {
    "Live Stream",
    "Palinsesto",
    "Programmi",
    "Eventi",
};




@Override
public void onCreate(Bundle savedInstanceState) {


    super.onCreate(savedInstanceState);


    setContentView(R.layout.activity_swipeytab);

    mViewPager = (ViewPager) findViewById(R.id.viewpager);
    mTabs = (SwipeyTabs) findViewById(R.id.swipey_tab);

    SwipeyTabsPagerAdapter adapter = new SwipeyTabsPagerAdapter(this,
            getSupportFragmentManager());
    mViewPager.setAdapter(adapter);
    mTabs.setAdapter(adapter);
    mViewPager.setOnPageChangeListener(mTabs);
    mViewPager.setCurrentItem(0);
/*
    Inizializza();

    //new AsyncTaskProc().execute();

    //new Timer().schedule(new IceCastPoll(), 1000);
     */
}

private void startStreamingAudio() {
    try { 
        final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progress_bar);
        if ( audioStreamer != null) {
            audioStreamer.interrupt();
        }


        audioStreamer = new StreamingMediaPlayer(this, textStreamed, playButton, streamButton,progressBar);
        audioStreamer.startStreaming("http://r35798.ovh.net:8000/listen",1677, 214);
        streamButton.setEnabled(false);
    } catch (IOException e) {               
    }

}
private void Inizializza()
{
    textStreamed = (TextView) findViewById(R.id.text_kb_streamed);
    streamButton = (Button) findViewById(R.id.button_stream);
    streamButton.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            startStreamingAudio();
        }});


    playButton = (ImageButton) findViewById(R.id.button_play);
    playButton.setEnabled(false);
    playButton.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            if (audioStreamer.getMediaPlayer().isPlaying()) {
                audioStreamer.getMediaPlayer().pause();
                playButton.setImageResource(R.drawable.button_play);
            } else {
                audioStreamer.getMediaPlayer().start();

                audioStreamer.startPlayProgressUpdater();
                playButton.setImageResource(R.drawable.button_pause);
            }
            isPlaying = !isPlaying;
        }});
}
private class SwipeyTabsPagerAdapter extends FragmentPagerAdapter implements
SwipeyTabsAdapter {

    private final Context mContext;

    public SwipeyTabsPagerAdapter(Context context, FragmentManager fm) {
        super(fm);

        this.mContext = context;
    }

    @Override
    public Fragment getItem(int position) {
        return SwipeyTabFragment.newInstance(TITLES[position]);
    }

    @Override
    public int getCount() {
        return TITLES.length;
    }

    public TextView getTab(final int position, SwipeyTabs root) {
        TextView view = (TextView) LayoutInflater.from(mContext).inflate(
                R.layout.swipey_tab_indicator, root, false);
        view.setText(TITLES[position]);
        view.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                mViewPager.setCurrentItem(position);
            }
        });

        return view;
    }

}


public void onPageScrollStateChanged(int arg0) {
    // TODO Auto-generated method stub

}

public void onPageScrolled(int arg0, float arg1, int arg2) {
    // TODO Auto-generated method stub

}

public void onPageSelected(int arg0) {
    // TODO Auto-generated method stub

}
//////////////////////////////////////

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    menu.add("Uscita").setOnMenuItemClickListener(
            new OnMenuItemClickListener() {
                public boolean onMenuItemClick(MenuItem item) {
                    Toast.makeText(getApplicationContext(),
                            "Uscita Programma", Toast.LENGTH_SHORT).show();
                    finish();
                    System.exit(0);

                    return true;
                }
            });
    ;


    return true;
}

public class IceCastPoll extends TimerTask {

    public IceCastPoll() {

    }

    @TargetApi(9)
    public void run() {
        Scraper scraper = new IceCastScraper();
        try {

            List<Stream> streams=null;
            StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
            StrictMode.setThreadPolicy(policy);
            streams = scraper.scrape(new URI("http://r35798.ovh.net:8000"));            
            for (Stream stream: streams) {
                Toast.makeText(getApplicationContext(),stream.getCurrentSong(), Toast.LENGTH_LONG).show();
                //textSong.setText((stream.getCurrentSong()));
            }
        }
        catch (URISyntaxException e) {

            System.out.println(e.getMessage());
        }
        catch (ScrapeException e) {

            System.out.println(e.getMessage());
        }

    }

}


class AsyncTaskProc extends AsyncTask<Void, String, Void> {
    List<Stream> streams=null;

    protected void onPostExecute()
    {

        textSong =(TextView) findViewById(R.id.textViewCurrentSong);

        try {
            for (Stream stream: streams) {

                textSong.setText((stream.getCurrentSong()));
            }
        } catch (Exception e) {
            //Toast.makeText(getApplicationContext(),e.toString(), Toast.LENGTH_SHORT).show();

        }

    }
    @TargetApi(9)
    @Override
    protected Void doInBackground(Void... unused) {



        Scraper scraper = new IceCastScraper();

        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);

        try {
            streams = scraper.scrape(new URI("http://r35798.ovh.net:8000/"));
        } catch (ScrapeException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            //Toast.makeText(getApplicationContext(),e.toString(), Toast.LENGTH_LONG).show();
        } catch (URISyntaxException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            //Toast.makeText(getApplicationContext(),e.toString(), Toast.LENGTH_LONG).show();
        }




        return (null);
    }


}
}

when I try to compile and run the application crash, and I can’t understand why.
Thanks;

  • 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-06-13T18:03:51+00:00Added an answer on June 13, 2026 at 6:03 pm

    Here is the important part of the stack:

    Caused by: java.lang.NullPointerException
        at com.example.appuniradiocesena.SwipeyTabsSampleActivity.onCreate(SwipeyTabsSampleActivity.java:77)
    

    –> You should find the cause of the NullPointerException by looking at line 77 of SwipeyTabsSampleActivity.java.

    Maybe you are calling findViewById() on IDs that do not exist in your layout ? (which would make this method return null)

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

Sidebar

Related Questions

Don't know why but font is not displaying.Please help. CSS(in css folder): style.css: @font-face
Don't know if anyone can help me with this or if it's even possible.
Don't know what to do with this error. How to add data in SQL
Don't understand, if Data.Map is and [] is. I found this out while wondering
Don't know why this conversion fails. SELECT CAST('32.999' AS INT) throws the error saying
Don't dismiss this as a newbie question! It's not, I'm not, I've tried everything,
I don't know why, but this code worked for me a month ago... maybe
Don't ask why, but is there any way to suppress a failed linking error?
Don't be afraid to use any technical jargon or low-level explanations for things, please.
I don't know: if this works. if it's a good idea. what it is

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.