Q: expression expected while passing fragment class into addSlide method I'm working on a simple documentary app and i want to implement an appIntro for first run.
i just founded the code below on GIT but while passing the fragment class into addSlide method the AS gives me the error "Expression Expected".
i tried project clean and rebuild the error shown in LOG was this :
Error:(19, 18) error: cannot find symbol variable ScreenSlidePageFragment
Error:(20, 18) error: cannot find symbol variable slide2
Error:(21, 18) error: cannot find symbol variable slide3
Error:(22, 18) error: cannot find symbol variable slide4
here is my AppIntro class :
 import android.graphics.Color;
 import android.os.Bundle;

 import com.github.paolorotolo.appintro.AppIntro;
 import com.github.paolorotolo.appintro.AppIntroFragment;

     /**
       * Created by ASUS on 9/14/2015.
     */
 public class MyIntro extends AppIntro {
   // Please DO NOT override onCreate. Use init
   @Override
    public void init(Bundle savedInstanceState) {

    // Add your slide's fragments here
    // AppIntro will automatically generate the dots indicator and buttons.
    addSlide(ScreenSlidePageFragment);
    addSlide(slide2);
    addSlide(slide3);
    addSlide(slide4);


    // Instead of fragments, you can also use our default slide
    // Just set a title, description, background and image. AppIntro will do the rest
 //  addSlide(AppIntroFragment.newInstance("dansjoo","hello stdents","/drawable/introback1.png", "black"));

    // OPTIONAL METHODS
    // Override bar/separator color
    setBarColor(Color.parseColor("#3F51B5"));
    setSeparatorColor(Color.parseColor("#2196F3"));
    setFlowAnimation();

    // Hide Skip/Done button
    showSkipButton(false);
    showDoneButton(false);

    // Turn vibration on and set intensity
    // NOTE: you will probably need to ask VIBRATE permesssion in Manifest
    setVibrate(true);
    setVibrateIntensity(30);
}



@Override
public void onSkipPressed() {
    // Do something when users tap on Skip button.
}

@Override
public void onDonePressed() {
    // Do something when users tap on Done button.
}}

and also here is one of my fragments class :
         package com.google.myapplication02;

    import android.app.Fragment;
    import android.os.Bundle;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;

        /**
         * Created by ASUS on 9/12/2015.
         */
         public class ScreenSlidePageFragment extends Fragment {
 public View onCreateView(LayoutInflater infaltor,ViewGroup container,Bundle savedInstanceState)
{
    ViewGroup rootView = (ViewGroup)infaltor.inflate(R.layout.intro1,container,false);
    return rootView;
}}

I've got no errors in XML files or in other classes
can anyone tell me what's wrong with my code ?

A: I think what is wrong is you have to create an instance of the fragment before calling them in addSlide(ScreenSlidePageFragment);
public class MyIntro extends AppIntro {

Appintro1 appIntro1 = new Appintro1();
Appintro2 appIntro2 = new Appintro2();
ScreenSlidePageFragment appIntro3 = new ScreenSlidePageFragment();

@Override
public void init(Bundle savedInstanceState) {
addSlide(appIntro1);
addSlide(appIntro2)
addSlide(appIntro3);
}
....
}

