Android - Trying to add clickable button...

Mohamad Zidani

Power Member
Joined
Nov 17, 2016
Messages
530
Reaction score
65
Hello

I tried to add a clickable button that lead to my google play developer account.

i add it to the about activity and give me error.

About.java : https://pastebin.com/fLY9EiEM

MainActivity.java : https://pastebin.com/JvuhwUqe

Problem : the app it's open naturally, but when i click on the about icon, the app closed with a message "Unfortunately, APP NAME has stopped."
 
Running it in the emulator with play store disabled?
 
If you're testing on the smartphone, the logcat will contain the exception.

You can run the following command on your computer:
adb shell
And once you are logged into your phone, run this command:
logcat | grep -i exception
You should see many exceptions popping up from other apps. NOW click on your button and see what exception comes pops up in the log.

OR

You can download some kind of logcat viewer for android with filter and filter the output based on the app name or the keyword "exception". But make sure you crash your app AFTER you have opened the logcat to be sure it's getting picked up by whatever viewer you're using.
 
Back
Top