J
J
JoniSuper2018-08-26 05:14:47
Java
JoniSuper, 2018-08-26 05:14:47

Why did the compilation error occur?

When compiling the apk file, an error appeared
5:08 Generate Signed APK: Errors while building APK. You can find the errors in the 'Messages' view.
Looked in 'messages' The
5b820d06d6ee2212107116.png5b820d0b316f8343008777.png
question is what to do?
Just in case, code:

package com.example.user.gey;


import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class activity_main {
}
public class MainActivity extends AppCompatActivity{
    Button bt;

@Override
    protected void OnCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
   bt = (Button)findViewById(R.id.find);
   final MediaPlayer mp = MediaPlayer.create (this, R.raw.old) ;
   bt.setOnClickListener(new View.OnClickListener() {
       @Override
       public void onClick(View v) {
           mp.start();
       }
   });

xml code
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <Button
        android:id="@+id/button"
        style="@android:style/Widget.Material.Light.Button.Borderless.Colored"
        android:layout_width="207dp"
        android:layout_height="107dp"
        android:background="@drawable/russia"
        android:text="Спугнуть педераста"
        tools:layout_editor_absoluteX="78dp"
        tools:layout_editor_absoluteY="63dp" />

    <Button
        android:id="@+id/find"
        android:layout_width="219dp"
        android:layout_height="101dp"
        android:background="@drawable/gey"
        android:text="Button"
        tools:layout_editor_absoluteX="71dp"
        tools:layout_editor_absoluteY="194dp"
        tools:text="Найти п*идора" />

    <TextView
        android:id="@+id/textView"
        android:layout_width="137dp"
        android:layout_height="41dp"
        android:text="Хелоу, епта"
        tools:layout_editor_absoluteX="122dp"
        tools:layout_editor_absoluteY="16dp" />

</android.support.constraint.ConstraintLayout>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Iloveski, 2018-08-26
@Iloveski

Execution exception usually occurs if the callable thread ends with an exception

S
s4kro, 2018-08-28
@s4kro

What's in the log?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question