Skip to content
Advertisement

Java problem, run time error, maybe problem occurs on numbers activity.xml file, tried to configure problem but still app is not working [closed]

MainActivity.java

JavaScript

activity_main.xml

JavaScript

numberActivity.java

JavaScript

activity_numbers.xml

JavaScript

Debugging error (in Logcat)=

JavaScript

numbersactivity.java file

numbersactivity.xml file

mainactivity.java file mainactivity.xml file

Help me find the problem please it may be simple error but don’t know what is causing app to crash, Its an app which represents numbers in words using intent, But when I click on number textview(which has the intent for) the app crashes before displaying the words for number… Please find the run time error I want to move forward with this app. Please help me please………………

Advertisement

Answer

your numbers_roottextview is a ConstraintLayout in your number_activity.xml but when you declare it in the java file you’re casting it to LinearLayout which results in the java.lang.RuntimeException:

JavaScript

So you should make it LinearLayout in the xml file

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement