I am making an app in Android studio, but I got an error saying that there are 6 classes, interface, or enum missing.
MainActivity.java has the following information:
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
public class MainActivity extensions AppCompatActivity{
@ Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView imageView 1= (ImageView) findViewById (R.id.feminine);
}
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView imageView 2= (ImageView) findViewById (R.id.bigfig);
imageView2.setImageResource(R.drawable.bigfig);
}
}
Looking at other people's errors, this error appears because there are not enough {}, but is it still there?
android java
{} has no problem
I guess it's from
class, interface, or enum missing
Rather, I think there are more problems with having two onCreate(Bundle SavedInstanceState)
.
I thought the number of {} would be fine...
Try erasing one of the onCreate, changing arguments, changing names, etc.
Otherwise, there seems to be a problem with another source code.
Maybe the error message is different.
© 2024 OneMinuteCode. All rights reserved.