Table of contents
Find the problem
A cliché, maybe this thing is really common, in the previous article
linkhttp://t.csdnimg.cn /UJQNb
We have already talked about the problem that after opening the software developed by Androidstuidio, there is no error but it cannot run (specifically, the application crashes)
So why still I have to write another article about this problem, because I encountered this problem again later, and the previous solution did not work
analyse problem
Like the previous article, I still found that the program was installed successfully but could not run
After checking the logcat, I found that
the problem still seemed to be with the page. Corresponding, so the author went to AndroidManifest.xml to check, but found that it had already been corresponding
Solution
Since the previous method is useless, let’s try something else. The author checked the error page reported by logcat and found a problem
The mainActivity here What is inherited is AppCompatActivity instead of Activity. Could this be the reason?
After modification, it can indeed run without crashing.
After checking The reason was found to be
linkhttp://t.csdnimg.cn/KzSgL
which is explained in detail in this article. You can read it