P
P
PlaBetaVer2020-11-19 11:53:55
Java
PlaBetaVer, 2020-11-19 11:53:55

Gradle Error while compiling android application?

I'm trying to run the application, but AM Gradle build failed with 1 error(s) appears in the Event log and does not show where the error is, nothing is clear at all, I'm new to android studio, but I didn't find an answer on the Internet.

package com.example.pr2_sh;


import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Button;


public class Game_Activity extends AppCompatActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_game_);

        int partA = 9;
        int partB = 9;
        int correctAnswer = partA * partB;
        int wrongAnswer1 = correctAnswer - 1;
        int wrongAnswer2 = correctAnswer + 1;

        TextView textObjectPartA =(TextView)findViewById(R.id.textPartA);
      TextView textObjectPartB =(TextView)findViewById(R.id.textPartB);
      Button buttonObjectChoice1 =(Button)findViewById(R.id.buttonChoice1);
      Button buttonObjectChoice2 =(Button)findViewById(R.id.buttonChoice2);
        Button buttonObjectChoice3 =(Button)findViewById(R.id.buttonChoice3);

        textObjectPartA.setText(partA);
        textObjectPartB.setText(partB);
        buttonObjectChoice1.setText(correctAnswer);
        buttonObjectChoice2.setText(wrongAnswer1);
        buttonObjectChoice3.setText(wrongAnswer2);
//"" +
    }
}


5fb6323ca762e762363932.jpeg
5fb6325832b05340102191.jpeg
5fb6329eb3c38135525560.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question