Minor problems encountered during Android development and problems encountered in Android Development
I,
You need to use a Theme. AppCompat theme (or descendant) with this activity Solution
The following error is reported:
Java. lang. runtimeException: Unable to start activityComponentInfo {com. example. test2/com. example. test2.MainActivity}: java. lang. illegalStateException: You need to use a Theme. appCompat theme (ordescendant) with this activity.
Solution:
The created activity is MainActivityextends ActionBarActivity. Change ActionBarActivity to Activity, export the package, and delete the following error to run it.
In the high version of adt, it will inherit from ActionBarActivity. If you need to change the topic, you need to change it to inherit from activity.
II,Installation error: INSTALL_FAILED_VERSION_DOWNGRADE
Recently, I had a hard time tossing the Robotium automated testing framework and found many problems. I just solved a problem and finally finished the environment. However, I ran the test cases one by one, installation error INSTALL_FAILED_VERSION_DOWNGRADE is reported again. I checked it online and said that the versionCode of AndroidManifest. xml is a little small. You just need to increase it. The default value is as follows:
Package ="Com. test. apppage"
Android: versionCode ="1"
Android: versionName ="1.0"
If the problem occurs, you cannot release or replace a later version. It is possible that the previous test version is a high version, and the next test is called a low version. Therefore, the earlier version cannot be replaced with the later version.