Click here to Skip to main content
15,907,492 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Main.java:24: error: illegal start of type
}else if(){
 ^
Main.java:29: error: illegal start of type
}else{
 ^
Main.java:33: error: <identifier> expected
mp = create.MediaPlayer.show();
  ^
Main.java:34: error: illegal start of type
if(mediaplayer.isActive){
^
Main.java:34: error: <identifier> expected
if(mediaplayer.isActive){
                       ^
Main.java:37: error: illegal start of type
}else{
 ^
Main.java:41: error: class, interface, or enum expected
}
^

Java
import android.os.Bundle;
import java.io.File;
import java.lang.Object;
import android.widget.Button;

public class able extends myClass{
    private static void MyStatic(){
        int torrent = value(any);
        value.insert(0, ".");
        Button button2 = new Button(findViewById.R.ID.new_listview2);
        setOnClickListener();

        FileReader(ExternalFilesDir);
        getExternalFilesDir();
        FileReader(FilesDir);
        getFilesDir();
        if(any.isActive){
            get.any();
            show.any(findViewById.R.ID.new_listview2);
        }
        else if(){
            get(any);
            show.any();
            start.mp();
            show.mp(findByView.R.popup-defaultplayer);
        }else{
            return;	
        }

        mp = create.MediaPlayer.show();
        if(mediaplayer.isActive){
            mediaplayerClick(true);
            start.mp();
        }else{
            return;	
        }
    }
}


What I have tried:

adding extra curly brace and removing curly brace
Posted
Updated 7-Feb-20 6:57am
v2
Comments
Richard Deeming 7-Feb-20 12:47pm    
You have an else if with no test in the if:
else if(){

I'd start by fixing that to see if it affects any of the other errors.

Look at your code:
Java
else if(){
Empty condition ... that's throwing up all the subsequent errors.
 
Share this answer
 
A look at the first 2 items shows the problems to be on lines 24 & 29. This appears to be a simple if...else if... else block; however, there is no condition for the else if() section. Fixing this should also take care of line 29 as well
Java
if(any.isActive){
	get.any();
	show.any(findViewById.R.ID.new_listview2);
}
else if(){			// line 24
	get(any);
	show.any();
	start.mp();
	show.mp(findByView.R.popup-defaultplayer);
}else{				// line 29
	return;
}
Lines 34 & 37 are also an if...then block; and again fixing the condition should take care of both errors indicated
Java
if(mediaplayer.isActive){	// Line34
	mediaplayerClick(true);
	start.mp();
}else{						// Line 37
	return;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900