T
T
The-TS2020-03-09 20:24:21
Kotlin
The-TS, 2020-03-09 20:24:21

ActivityNotFoundException, what to do?

5e6679bc0d35f299383214.jpeg

MainActivity.kt :

package com.example.app_calc

import android.animation.ObjectAnimator
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.example.calculatorapp.Main2Activity
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        //Code

        but_open.setOnClickListener {
            val intent = Intent(this, Main2Activity::class.java)
            startActivity(intent)
        }

        ObjectAnimator.ofFloat(textView6, "translationX", 1000f).apply {
            duration = 2000
            start()
        }

    }
}


Problem:
There is a button with ID but_open, I want to call Main2Activity using Intent.
So, when you try to click on the window, the application crashes.

And more precisely with this:

Changed:
Found a message on the screen - "Did you report this in your AndroidManifest.xml?" How to fix it?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
illuzor, 2020-03-09
@iLLuzor

https://developer.android.com/guide/components/act...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question