Android Wonderful problem: Run OK, package installation crashes (reason: code is not canonical cause compilation error)

Source: Internet
Author: User

Cough, or that sentence, it is the day of the dog

This problem is really hard to find, not much nonsense, on sauerkraut.

The error message is that the image returned by this method cannot be found

 Public Static intGetimgid (BooleanIsBig,intID) {if(id = =-2)            returnR.mipmap.tianjia; if(id = =-1)            returnR.mipmap.jiahao; if(isBig) {Switch(ID) { Case0:                    returnR.MIPMAP.JRFU;  Case1:                    returnR.mipmap.meishi;  Case2:                    returnR.mipmap.shenghuo;  Case3:                    returnR.mipmap.yule;  Case4:                    returnr.mipmap.dying;  Case5:                    returnr.mipmap.chuxing;  Case6:                    returnR.mipmap.jingdian;  Case7:                    returnR.mipmap.gouwu;  Case8:                    returnR.mipmap.jiudian;  Case9:                    returnR.mipmap.zhiyuan;  Case10:                    returnr.mipmap.xsyl;  Case11:                    returnR.MIPMAP.JRFU; }            returnR.mipmap.guanggao; } Else {            Switch(ID) { Case0:                    returnR.MIPMAP.JRFW;  Case1:                    returnr.mipmap.ms;  Case2:                    returnR.MIPMAP.SHFW;  Case3:                    returnR.mipmap.yl;  Case4:                    returnR.mipmap.dy;  Case5:                    returnr.mipmap.cx;  Case6:                    returnR.mipmap.jingdian_xiao;  Case7:                    returnR.MIPMAP.GW;  Case8:                    returnR.mipmap.jd;  Case9:                    returnR.mipmap.zyhn_xiao;  Case10:                    returnR.mipmap.xsyl_xiao;  Case11:                    returnR.MIPMAP.JRFW; }            returnR.mipmap.logo; }    }

The problem is that running the code is OK.

Then the sky was a loud noise, clairvoyant. Code to write the non-standard, no break, compile a problem, will be error.

Android Wonderful problem: Run OK, package installation crashes (reason: code is not canonical cause compilation error)

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.