Small problems with Android development

Source: Internet
Author: User

One

Need to use a theme.appcompat Theme (or descendant) and this activity workaround

The error is as follows:
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) and this activity.

Workaround:
The activity created is Mainactivityextends actionbaractivity. Change the back of the actionbaractivity to activity, and then guide the package, the following error where the deletion of the operation will not be.

In a higher version of ADT, it inherits from the Actionbaractivity, and if you need to change the theme, you need to change the inheritance to the activity.

Second, the problem of installation Error:install_failed_version_downgrade appears

Recently toss a bit of robotium automated testing framework, found that the problem is quite many, just solved a problem, finally, the environment is done, but a run test cases, found also reported installation error install_failed_version_ Downgrade was wrong. Online check, said is Androidmanifest.xml versioncode a bit small, should be changed a little bit on the line. The default is the following:

package="Com.test.apppage"

android:versioncode="1"

Android:versionname="1.0"

The issue occurs when the low version cannot be released with a high version of replace installation. It's possible that your last beta version was a high version, and the next test you tuned to a lower version. Therefore, the lower version cannot be replaced by the installation high version.

Small problems with Android development

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.