Minor problems encountered during Android development and problems encountered in Android Development

Source: Internet
Author: User

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.