??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩福利电影在线,中文一区二区视频,亚洲精品**不卡在线播hehttp://www.aygfsteel.com/qileilove/category/54152.html不想做屌丝的码农Q不是好目l理Q屌丝生涯从此开始!zh-cnFri, 16 May 2014 12:45:16 GMTFri, 16 May 2014 12:45:16 GMT60单介l如何用robotiumq行自动化测?/title><link>http://www.aygfsteel.com/qileilove/articles/413706.html</link><dc:creator>其自然EVO</dc:creator><author>其自然EVO</author><pubDate>Thu, 15 May 2014 13:20:00 GMT</pubDate><guid>http://www.aygfsteel.com/qileilove/articles/413706.html</guid><wfw:comment>http://www.aygfsteel.com/qileilove/comments/413706.html</wfw:comment><comments>http://www.aygfsteel.com/qileilove/articles/413706.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/qileilove/comments/commentRss/413706.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/qileilove/services/trackbacks/413706.html</trackback:ping><description><![CDATA[<p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 18pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -18pt;"><strong style="word-break: break-all;"><span style="word-break: break-all;"><span style="word-break: break-all;">1.<span style="word-break: break-all; font-weight: normal; font-size: 7pt;">      </span></span></span></strong><strong style="word-break: break-all;"><span style="word-break: break-all; font-family: 宋体;">创徏一个简单的工程</span></strong><span style="word-break: break-all; font-family: 宋体;">Q可参考本人的<a target="_self" style="word-break: break-all; text-decoration: underline; color: #009999;"><u style="word-break: break-all;"><strong style="word-break: break-all;">日志</strong></u></a>《第一个应?/span><span style="word-break: break-all;">HelloWorld</span><span style="word-break: break-all; font-family: 宋体;">》,需要对该工E稍做修改)<strong style="word-break: break-all;">作ؓ被测E序Q?/strong>q行后显C如下界?strong style="word-break: break-all;">Q?/strong></span><strong style="word-break: break-all;"></strong></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important;"> <a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171139341jxxn.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 18pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -18pt;"><strong style="word-break: break-all;"><span style="word-break: break-all;"><span style="word-break: break-all;">2.<span style="word-break: break-all; font-weight: normal; font-size: 7pt;">      </span></span></span></strong><strong style="word-break: break-all;"><span style="word-break: break-all; font-family: 宋体;">创徏一?/span><span style="word-break: break-all;"><a target="_self" style="word-break: break-all; text-decoration: underline; color: #009999;"><u style="word-break: break-all;"><strong style="word-break: break-all;">Test</strong></u></a> Project</span></strong></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">1).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">打开</span><span style="word-break: break-all;">eclipse</span><span style="word-break: break-all; font-family: 宋体;">Q选择</span><span style="word-break: break-all;">File->New->Project…->Android Test Project</span><span style="word-break: break-all; font-family: 宋体;">Q点?/span><span style="word-break: break-all;">Next</span><span style="word-break: break-all; font-family: 宋体;">?/span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important;"> <a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171140281CxeH.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">2).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">?/span><span style="word-break: break-all;">Test Project Name</span><span style="word-break: break-all; font-family: 宋体;">中输?a target="_self" style="word-break: break-all; text-decoration: underline; color: #009999;"><u style="word-break: break-all;"><strong style="word-break: break-all;">试</strong></u></a>工程的名Uͼ如:</span><span style="word-break: break-all;">HelloWorldTest</span><span style="word-break: break-all; font-family: 宋体;">。选择</span><span style="word-break: break-all;">An existing <a target="_self" style="word-break: break-all; text-decoration: underline; color: #009999;"><u style="word-break: break-all;"><strong style="word-break: break-all;">Android</strong></u></a> Project</span><span style="word-break: break-all; font-family: 宋体;">Q点d边的</span><span style="word-break: break-all;">Browse…</span><span style="word-break: break-all; font-family: 宋体;">按钮?/span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all; font-family: 宋体;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171141291TwGt.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">3).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">选择被测工程Q如之前创徏?/span><span style="word-break: break-all;">HelloWorldnp</span><span style="word-break: break-all; font-family: 宋体;">Q点?/span><span style="word-break: break-all;">OK</span><span style="word-break: break-all; font-family: 宋体;">按钮?/span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all; font-family: 宋体;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171142231zUo6.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">4).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">会自动选择和输?/span><span style="word-break: break-all;">Build Target</span><span style="word-break: break-all; font-family: 宋体;">?/span><span style="word-break: break-all;">Properties</span><span style="word-break: break-all; font-family: 宋体;">Q可以按照默认的Q不用修攏V?/span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all; font-family: 宋体;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_2010111711431619omJ.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">5).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">一个新建的试工程Q?/span><span style="word-break: break-all;">HelloWorldTest</span><span style="word-break: break-all; font-family: 宋体;">Q就创徏好了Q如下图Q?/span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important;"> <a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171143581wkfC.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 18pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -18pt;"><strong style="word-break: break-all;"><span style="word-break: break-all;"><span style="word-break: break-all;">3.<span style="word-break: break-all; font-weight: normal; font-size: 7pt;">      </span></span></span></strong><strong style="word-break: break-all;"><span style="word-break: break-all; font-family: 宋体;">创徏一?/span><span style="word-break: break-all;">Test Case</span></strong></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">1).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">?/span><span style="word-break: break-all;">HelloWorldTest->src->com.liliandroid.helloworld.test</span><span style="word-break: break-all; font-family: 宋体;">上,叛_选择</span><span style="word-break: break-all;">New->Class</span><span style="word-break: break-all; font-family: 宋体;">Q创Z?/span><span style="word-break: break-all;">Test Case</span><span style="word-break: break-all; font-family: 宋体;">?/span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important;"> <a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_2010111711444916FRr.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">2).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">?/span><span style="word-break: break-all;">Name</span><span style="word-break: break-all; font-family: 宋体;">中输?/span><span style="word-break: break-all;">Test Case</span><span style="word-break: break-all; font-family: 宋体;">的名字,如:</span><span style="word-break: break-all;">UITextTest</span><span style="word-break: break-all; font-family: 宋体;">?/span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all; font-family: 宋体;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171146061ZqbX.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">3).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">创徏好的</span><span style="word-break: break-all;">Test Case</span><span style="word-break: break-all; font-family: 宋体;">如下图:</span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important;"> <a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_2010111711470517ry2.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 18pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -18pt;"><strong style="word-break: break-all;"><span style="word-break: break-all;"><span style="word-break: break-all;">4.<span style="word-break: break-all; font-weight: normal; font-size: 7pt;">      </span></span></span></strong><strong style="word-break: break-all;"><span style="word-break: break-all; font-family: 宋体;">导入</span><span style="word-break: break-all;">robotium.jar</span></strong></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">1).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">选择试工程</span><span style="word-break: break-all;">HelloWorldTest</span><span style="word-break: break-all; font-family: 宋体;">叛_Q选择</span><span style="word-break: break-all;">Build Path->Configure Build Path…</span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important;"> <a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171147451aNGl.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">2).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">在打开?/span><span style="word-break: break-all;">Properties for HelloWorldTest</span><span style="word-break: break-all; font-family: 宋体;">中点?/span><span style="word-break: break-all;">Add External JARs…</span><span style="word-break: break-all; font-family: 宋体;">按钮?/span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all; font-family: 宋体;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171148351A19g.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">3).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">因ؓ之前创徏的工E的</span><span style="word-break: break-all;">SDK</span><span style="word-break: break-all; font-family: 宋体;">?/span><span style="word-break: break-all;">2.2</span><span style="word-break: break-all; font-family: 宋体;">的,所以选择</span><span style="word-break: break-all;">robotium-solo-1.8.0.jar</span><span style="word-break: break-all; font-family: 宋体;">?/span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all; font-family: 宋体;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_2010111711492218gV7.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">4).<span style="word-break: break-all; font-size: 7pt;">     </span></span></span><span style="word-break: break-all; font-family: 宋体;">点击</span><span style="word-break: break-all;">OK</span><span style="word-break: break-all; font-family: 宋体;">按钮?/span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 21pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -21pt;"><span style="word-break: break-all; font-family: 宋体;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171150121INXF.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 18pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -18pt;"><strong style="word-break: break-all;"><span style="word-break: break-all;"><span style="word-break: break-all;">5.<span style="word-break: break-all; font-weight: normal; font-size: 7pt;">      </span></span></span></strong><strong style="word-break: break-all;"><span style="word-break: break-all; font-family: 宋体;">修改</span><span style="word-break: break-all;">Test Case</span></strong></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-family: 宋体;">打开</span><span style="word-break: break-all;">UITextTest.java</span><span style="word-break: break-all; font-family: 宋体;">Q输入以下内容ƈ保存Q?/span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">package</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">com.liliandroid.helloworld.test;</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">import</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">android.test.ActivityInstrumentationTestCase2;</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">import</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">com.liliandroid.helloworld.ActivityMain;</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">import</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">com.jayway.android.robotium.solo.Solo;</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">public</span></strong><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">class</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">UITextTest</span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">extends</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">ActivityInstrumentationTestCase2<ActivityMain>{</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">      </span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">private</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">Solo</span><span style="word-break: break-all; line-height: normal !important; font-size: 10pt; color: #0000c0; font-family: 'Courier New';">solo</span><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">;</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">      </span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">public</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">UITextTest() {</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">          </span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">super</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">(</span><span style="word-break: break-all; line-height: normal !important; font-size: 10pt; color: #2a00ff; font-family: 'Courier New';">"com.liliandroid.helloworld"</span><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">, ActivityMain.</span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">class</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">);</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;"><span style="word-break: break-all;">          </span>}</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">          </span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">      </span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">public</span></strong><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">void</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">setUp()</span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">throws</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">Exception {</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">          </span><span style="word-break: break-all; line-height: normal !important; font-size: 10pt; color: #0000c0; font-family: 'Courier New';">solo</span><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">=</span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">new</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">Solo(getInstrumentation(), getActivity());</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;"><span style="word-break: break-all;">      </span><span style="word-break: break-all;">      </span> }</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;"><span style="word-break: break-all;">          </span> <span style="word-break: break-all;">  </span></span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">      </span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">public</span></strong><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">void</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">testUI()</span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">throws</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">Exception {</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">          </span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">boolean</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">expected =</span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">true</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">;</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">          </span><strong style="word-break: break-all; line-height: normal !important;"><span style="word-break: break-all; font-size: 10pt; color: #7f0055; font-family: 'Courier New';">boolean</span></strong><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">actual =</span><span style="word-break: break-all; line-height: normal !important; font-size: 10pt; color: #0000c0; font-family: 'Courier New';">solo</span><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">.searchText(</span><span style="word-break: break-all; line-height: normal !important; font-size: 10pt; color: #2a00ff; font-family: 'Courier New';">"This"</span><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">) &&</span><span style="word-break: break-all; line-height: normal !important; font-size: 10pt; color: #0000c0; font-family: 'Courier New';">solo</span><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">.searchText(</span><span style="word-break: break-all; line-height: normal !important; font-size: 10pt; color: #2a00ff; font-family: 'Courier New';">"is"</span><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">);</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;"><span style="word-break: break-all;">          </span> <em style="word-break: break-all;">assertEquals</em>(</span><span style="word-break: break-all; line-height: normal !important; font-size: 10pt; color: #2a00ff; font-family: 'Courier New';">"This and/or is are not found"</span><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">, expected, actual);</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">          </span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;"><span style="word-break: break-all;">      </span>}</span></p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p align="left" style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">   </span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-size: 10pt; font-family: 'Courier New'; line-height: normal !important;">}</span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-family: 宋体;">注:q个</span><span style="word-break: break-all;">Case</span><span style="word-break: break-all; font-family: 宋体;">是测试运行了</span><span style="word-break: break-all;">ActivityMain</span><span style="word-break: break-all; font-family: 宋体;">后的界面上是否有</span><span style="word-break: break-all;">This</span><span style="word-break: break-all; font-family: 宋体;">?/span><span style="word-break: break-all;">is</span><span style="word-break: break-all; font-family: 宋体;">q两个文字?/span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171153451vQj9.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a> </span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 18pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -18pt;"><strong style="word-break: break-all;"><span style="word-break: break-all;"><span style="word-break: break-all;">6.<span style="word-break: break-all; font-weight: normal; font-size: 7pt;">      </span></span></span></strong><strong style="word-break: break-all;"><span style="word-break: break-all; font-family: 宋体;">q行试E序</span></strong></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-family: 宋体;">选择试工程</span><span style="word-break: break-all;">HelloWorldTest</span><span style="word-break: break-all; font-family: 宋体;">叛_Q选择</span><span style="word-break: break-all;">Run As->Android <a target="_self" style="word-break: break-all; text-decoration: underline; color: #009999;"><u style="word-break: break-all;"><strong style="word-break: break-all;">JUnit</strong></u></a> Test</span><span style="word-break: break-all; font-family: 宋体;">q行试E序</span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-family: 宋体;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171154471v8KZ.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-family: 宋体;">q行完后的测试结果界面(</span><span style="word-break: break-all;">Pass</span><span style="word-break: break-all; font-family: 宋体;">Q?/span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important;"> <a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171155311zhue.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a></span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; font-family: 宋体;">q行完后的测试结果界面(</span><span style="word-break: break-all;">Fail</span><span style="word-break: break-all; font-family: 宋体;">Q?/span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important;"><a target="_blank" style="word-break: break-all; color: #009999;"><img src="http://www.51testing.com/attachments/2010/11/115892_201011171156021mehX.jpg" border="0" style="word-break: break-all; max-width: 400px;" alt="" /></a> </span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"><span style="word-break: break-all; line-height: normal !important; font-family: 宋体;">注:</span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 18pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -18pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">1.<span style="word-break: break-all; font-size: 7pt;">      </span></span></span><span style="word-break: break-all; font-family: 宋体;">被测试的工程和测试的工程可以是不同的</span><span style="word-break: break-all;">SDK</span><span style="word-break: break-all; font-family: 宋体;">Q但是不知道有什么媄响?/span></p><p style="word-break: break-all; line-height: 21.59375px; margin: 0cm 0cm 0pt 18pt; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff; text-indent: -18pt;"><span style="word-break: break-all;"><span style="word-break: break-all;">2.<span style="word-break: break-all; font-size: 7pt;">      </span></span></span><span style="word-break: break-all; font-family: 宋体;">q是?/span><span style="word-break: break-all;">eclipse</span><span style="word-break: break-all; font-family: 宋体;">中进行测试的Q也可以在模拟器或?a target="_self" style="word-break: break-all; text-decoration: underline; color: #009999;"><u style="word-break: break-all;"><strong style="word-break: break-all;">手机</strong></u></a>上测试。如果需要直接在模拟器或者手Z试Q需要将试包和被测试包Ҏ相同的签名。(关于</span><span style="word-break: break-all;">apk</span><span style="word-break: break-all; font-family: 宋体;">包的{֐和重{֐Q请参考本人日志《重新签?/span><span style="word-break: break-all;">APK</span><span style="word-break: break-all; font-family: 宋体;">文g》)</span></p><p style="word-break: break-all; line-height: 21.59375px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><img src ="http://www.aygfsteel.com/qileilove/aggbug/413706.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/qileilove/" target="_blank">其自然EVO</a> 2014-05-15 21:20 <a href="http://www.aygfsteel.com/qileilove/articles/413706.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Robotium针对只有apk包的试Ҏhttp://www.aygfsteel.com/qileilove/articles/413705.html其自然EVO其自然EVOThu, 15 May 2014 13:16:00 GMThttp://www.aygfsteel.com/qileilove/articles/413705.htmlhttp://www.aygfsteel.com/qileilove/comments/413705.htmlhttp://www.aygfsteel.com/qileilove/articles/413705.html#Feedback0http://www.aygfsteel.com/qileilove/comments/commentRss/413705.htmlhttp://www.aygfsteel.com/qileilove/services/trackbacks/413705.html阅读全文

其自然EVO 2014-05-15 21:16 发表评论
]]>
Robotium环境搭徏与新手入门教E?/title><link>http://www.aygfsteel.com/qileilove/articles/413704.html</link><dc:creator>其自然EVO</dc:creator><author>其自然EVO</author><pubDate>Thu, 15 May 2014 13:15:00 GMT</pubDate><guid>http://www.aygfsteel.com/qileilove/articles/413704.html</guid><wfw:comment>http://www.aygfsteel.com/qileilove/comments/413704.html</wfw:comment><comments>http://www.aygfsteel.com/qileilove/articles/413704.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/qileilove/comments/commentRss/413704.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/qileilove/services/trackbacks/413704.html</trackback:ping><description><![CDATA[<ul style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; list-style: none outside; line-height: 1.5; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif;"><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: disc;"><h1><strong style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">准备工具Q?a target="_blank" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Robotium资料下蝲</a></strong></h1></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: disc;"><h1>知识准备Q?/h1></li></ul><ol style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; list-style: none outside; line-height: 1.5; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif;"><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">java基础知识Q如基本的数据结构、语法结构、类、承等</li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">对Androidpȝ较ؓ熟悉Q了解四大组Ӟ会编写简单的Android应用E序</li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">熟悉Eclipse IDE使用Ҏ</li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">有够的耐心与探索精,遇到问题可以熟练?a target="_blank" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Google</a></li></ol><ul style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; list-style: none outside; line-height: 1.5; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif;"><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: disc;"><h1><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; line-height: 26px;">环境搭徏</span></h1></li></ul><ol style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; list-style: none outside; line-height: 1.5; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif;"><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">安装jdkQ配|环境变量,如果不会误?a target="_blank" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Google</a></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">下蝲安装Android SDKQƈ更新</li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">下蝲EclipseQƈ安装ADT插gQ集成Android SDK</li></ol><ul style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; list-style: none outside; line-height: 1.5; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif;"><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: disc;"><h1>Robotium新手入门</h1></li></ul><ol style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; list-style: none outside; line-height: 1.5; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif;"><ol style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style: none outside; line-height: 1.5;"><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">下蝲Robotium<a title=" ExampleTestProject_v4.0.zip" target="_blank" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">官方例子</a>以及最新的<a title=" robotium-solo-4.0.jar" target="_blank" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">JAR</a>?/li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">打开Eclipse导入被测试工E?p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_211" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 310px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-211"="" title="点击查看大图" alt="导入被测工程" src="http://www.robotium.cn/wp-content/uploads/2013/03/1-300x180.png" width="300" height="180" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">创徏试工程Q选择Android Test ProjectQƈ点击下一?p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_220" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 265px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-220"="" title="点击查看大图" alt="点击查看大图" src="http://www.robotium.cn/wp-content/uploads/2013/03/11-255x300.png" width="255" height="300" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">输入工程名,q点M一?p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_220" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 265px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-220"="" alt="点击查看大图" src="http://www.robotium.cn/wp-content/uploads/2013/03/11-255x300.png" width="255" height="300" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">选择被测工程NotePadQƈ点击完成<p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_214" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 310px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-214"="" alt="4" src="http://www.robotium.cn/wp-content/uploads/2013/03/4-300x285.png" width="300" height="285" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">在测试工E中新徏lib文g?p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_215" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 310px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-215"="" alt="5" src="http://www.robotium.cn/wp-content/uploads/2013/03/5-300x187.jpg" width="300" height="187" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">下载好的Robotium jar包拷入lib中,q在build path中将jar包引入工E?p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_217" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 120px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-217"="" alt="7" src="http://www.robotium.cn/wp-content/uploads/2013/03/7-110x300.jpg" width="110" height="300" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">打开试工程中的manifest.xml文gQ修改如?p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_221" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 310px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-221"="" alt="12" src="http://www.robotium.cn/wp-content/uploads/2013/03/12-300x98.png" width="300" height="98" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li></ol></ol><pre line="1" style="margin: 1.5em; padding: 15px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; white-space: pre-line; word-wrap: break-word; font-family: monospace, sans-serif; color: #444444; line-height: 23px;"></pre><ol style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; list-style: none outside; line-height: 1.5; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif;"><ol style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style: none outside; line-height: 1.5;"><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">新徏junit test caseQ选择junit4Qƈ输入cdQ点d?p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_222" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 262px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-222"="" alt="13" src="http://www.robotium.cn/wp-content/uploads/2013/03/13-252x300.png" width="252" height="300" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">打开新徏的测试类Q修改承ActivityInstrumentationTestCase2<NotesList>Q创建构造方法,q编写测试代码,具体如图<p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_223" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 310px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-223"="" alt="14" src="http://www.robotium.cn/wp-content/uploads/2013/03/14-300x164.png" width="300" height="164" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li></ol></ol><pre style="margin: 1.5em; padding: 15px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; white-space: pre-line; word-wrap: break-word; font-family: monospace, sans-serif; color: #444444; line-height: 23px;">package com.example.android.notepad.test; import android.test.ActivityInstrumentationTestCase2; import com.example.android.notepad.NotesList; import com.jayway.android.robotium.solo.Solo; public class NotePadTest extends ActivityInstrumentationTestCase2 { private Solo solo;//声明Solo public NotePadTest()//构造方?{ super(NotesList.class); } @Override public void setUp() throws Exception { solo = new Solo(getInstrumentation(), getActivity()); } @Override public void tearDown() throws Exception { solo.finishOpenedActivities(); } public void testAddNote() throws Exception { //点击add note按钮 solo.clickOnMenuItem("Add note"); //比对l果 solo.assertCurrentActivity("Expected NoteEditor activity", "NoteEditor"); //在第一个TextEdit控g上输入内?solo.enterText(0, "Note 1"); //q回上个界面 solo.goBack(); //点击菜单中的Add note solo.clickOnMenuItem("Add note"); //在第一个EditText中输入内?solo.enterText(0, "Note 2"); //q回NotesList activity solo.goBackToActivity("NotesList"); //截屏 solo.takeScreenshot(); boolean expected = true; boolean actual = solo.searchText("Note 1") ; solo.searchText("Note 2"); assertEquals("Note 1 and/or Note 2 are not found", expected, actual); } }</pre><ol style="margin: 1.5em 2.2em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; list-style: none outside; line-height: 1.5; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif;"><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">~写完成后,打开模拟器或者连接上真机Q右L试类Q选择Android junit Test<p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_224" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 310px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-224"="" title="点击查看大图" alt="15" src="http://www.robotium.cn/wp-content/uploads/2013/03/15-300x180.png" width="300" height="180" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">Eclipse会切换到junit界面Q此时模拟器Q真机)会自动执行测试,通过左边界面可以看到q行l果<p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; orphans: 4;"></p><div class="wmqeeuq" id="attachment_225" aligncenter"="" style="margin: 0px auto 1.5em; padding-top: 5px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; box-sizing: border-box; clear: both; text-align: center; max-width: 100%; height: auto; width: 310px;"><a style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img wp-image-225"="" title="点击查看大图" alt="16" src="http://www.robotium.cn/wp-content/uploads/2013/03/16-300x180.png" width="300" height="180" style="margin: 0.75em 0px 5px; padding: 0px; border: 0px none; outline: 0px; vertical-align: baseline; background-color: transparent; max-width: 100%; height: auto;" /></a><p style="margin: 0.6em 0px -0.2em; padding: 0px; border: 0px; outline: 0px; font-size: 0.8em; vertical-align: baseline; background-color: transparent; orphans: 4; font-style: italic; background-position: initial initial; background-repeat: initial initial;">点击查看大图</p></div></li><li style="margin: 0px 0px 0.75em; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; list-style-type: decimal;">一个简单的试q束了。如果你没有遇到问题Q那么恭喜你l箋更深一步学习,如果你遇到问题了Q不要急~请先保你的操作q程没有ZQ何错误,其次我列Z可能遇到的错误,如果q是没有解决?a target="_blank" style="margin: 0px; padding: 0px; vertical-align: baseline; background-color: transparent; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Google</a>或者联pL?/li></ol><h2>1、最常见的:java.lang.NoClassDefFoundError: com.jayway.android.robotium.solo.Solo</h2><h2>解决ҎQ如图操作后再clean工程<a style="margin: 0px; padding: 0px; font-size: 24px; vertical-align: baseline; color: #e01222; text-decoration: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><img size-medium="" wp-image-229"="" alt="34" src="http://www.robotium.cn/wp-content/uploads/2013/03/34-300x224.png" width="300" height="224" style="margin: 0.75em auto 5px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; display: block; clear: both; max-width: 100%; height: auto;" /></a></h2><p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; orphans: 4; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;"> </p><p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; orphans: 4; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;"> </p><p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; orphans: 4; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;"> </p><p style="margin: 0px 0px 1.5em; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; orphans: 4; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;"> </p><p style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 16px; vertical-align: baseline; background-color: #ffffff; orphans: 4; color: #444444; font-family: Georgia, 'Times New Roman', Times, serif; line-height: 23px;"> </p><img src ="http://www.aygfsteel.com/qileilove/aggbug/413704.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/qileilove/" target="_blank">其自然EVO</a> 2014-05-15 21:15 <a href="http://www.aygfsteel.com/qileilove/articles/413704.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>android maven配置http://www.aygfsteel.com/qileilove/articles/412327.html其自然EVO其自然EVOFri, 11 Apr 2014 10:56:00 GMThttp://www.aygfsteel.com/qileilove/articles/412327.htmlhttp://www.aygfsteel.com/qileilove/comments/412327.htmlhttp://www.aygfsteel.com/qileilove/articles/412327.html#Feedback0http://www.aygfsteel.com/qileilove/comments/commentRss/412327.htmlhttp://www.aygfsteel.com/qileilove/services/trackbacks/412327.html
  • http://code.google.com/p/maven-android-plugin/
    1. 安装jdk 略过  我的是这个版本Java(TM) SE Runtime Environment (build 1.6.0_38-b05) 
    2. 安装Android-sdk  
    3. 到Maven的官方下载最新版本的Maven
    • 下蝲地址 http://maven.apache.org/download.html
    • 我下载的?Maven 3.0.4
    • 找个文g夹解压,q|到pȝ的环境变?br />
      • /home/wuyexiong/Android/tool/maven/apache-maven-3.0.4/bin 配置?etc/environment
      • ANDROID_HOME="/home/wuyexiong/Android/android-linux/adt-bundle-linux-x86_64/sdk"
        q个sdk  可以利用anroidmanager来下?sdk

  • 打开该网,点击 GettingStarted 跌{到http://code.google.com/p/maven-android-plugin/wiki/GettingStarted 该页?br />
    想编译Android目q差最后一?Q用git?nbsp;Maven AndroidSDK Deployer  目载到本地
      • 在此之前的环境都搭徏完毕的前提下Q进入该目的跟目录
      • 执行 mvn clean install ?׃自动构徏Android-maven的编译环?br />
        mvn install -P 4.0 会把 相关的sdk 上传?maven仓库? 折腾?老子一? ׃安|不? maven依赖的jar都下载不下来  到公叔ROK
      • 中途会下蝲一些东西,查你的sdk{等Q稍作等候即?/li>
        1. [INFO] ------------------------------------------------------------------------  
        2. [INFO] Reactor Summary:  
        3. [INFO]   
        4. [INFO] Maven Android SDK Deployer ........................ SUCCESS [0.232s]  
        5. [INFO] Android Platforms ................................. SUCCESS [0.007s]  
        6. [INFO] Android Platform 1.5 API 3 ........................ SUCCESS [0.065s]  
        7. [INFO] Android Platform 1.6 API 4 ........................ SUCCESS [0.013s]  
        8. [INFO] Android Platform 2.1 API 7 ........................ SUCCESS [0.012s]  
        9. [INFO] Android Platform 2.2 API 8 ........................ SUCCESS [0.013s]  
        10. [INFO] Android Platform 2.3.3 API 10 ..................... SUCCESS [0.013s]  
        11. [INFO] Android Platform 3.0 API 11 ....................... SUCCESS [0.028s]  
        12. [INFO] Android Platform 3.1 API 12 ....................... SUCCESS [0.013s]  
        13. [INFO] Android Platform 3.2 API 13 ....................... SUCCESS [0.013s]  
        14. [INFO] Android Platform 4.0 API 14 ....................... SUCCESS [0.012s]  
        15. [INFO] Android Platform 4.0.3 API 15 ..................... SUCCESS [0.013s]  
        16. [INFO] Android Platform 4.1 API 16 ....................... SUCCESS [0.013s]  
        17. [INFO] Android Platform 4.2 API 17 ....................... SUCCESS [0.012s]  
        18. [INFO] Android Add-Ons ................................... SUCCESS [0.006s]  
        19. [INFO] Android Add-On Google Platform 1.5 API 3 (Maps) ... SUCCESS [0.018s]  
        20. [INFO] Android Add-On Google Platform 1.6 API 4 (Maps) ... SUCCESS [0.013s]  
        21. [INFO] Android Add-On Google Platform 2.1 API 7 (Maps) ... SUCCESS [0.013s]  
        22. [INFO] Android Add-On Google Platform 2.2 API 8 (Maps) ... SUCCESS [0.014s]  
        23. [INFO] Android Add-On Google Platform 2.3.3 API 10 (Maps and USB)  SUCCESS [0.017s]  
        24. [INFO] Android Add-On Google Platform 3.0 API 11 (Maps) .. SUCCESS [0.013s]  
        25. [INFO] Android Add-On Google Platform 3.1 API 12 (Maps and USB)  SUCCESS [0.017s]  
        26. [INFO] Android Add-On Google Platform 3.2 API 13 (Maps and USB)  SUCCESS [0.016s]  
        27. [INFO] Android Add-On Google Platform 4.0 API 14 (Maps and USB)  SUCCESS [0.017s]  
        28. [INFO] Android Add-On Google Platform 4.0.3 API 15 (Maps and USB)  SUCCESS [0.018s]  
        29. [INFO] Android Add-On Google Platform 4.1 API 16 (Maps and USB)  SUCCESS [0.019s]  
        30. [INFO] Android Add-On Google Platform 4.2 API 17 (Maps and USB)  SUCCESS [0.018s]  
        31. [INFO] Android Extras .................................... SUCCESS [0.009s]  
        32. [INFO] Android Compatibility Extra V4 .................... SUCCESS [0.013s]  
        33. [INFO] Android Compatibility Extra V7 Gridlayout Library . SUCCESS [1.999s]  
        34. [INFO] Android Compatibility Extra V13 ................... SUCCESS [0.009s]  
        35. [INFO] Android Google Analytics Extra .................... SUCCESS [0.009s]  
        36. [INFO] Android Google AdMob Ads Extra .................... SUCCESS [0.009s]  
        37. [INFO] Android Google Cloud Messaging Library Extra Parent  SUCCESS [0.006s]  
        38. [INFO] Android Google Cloud Messaging Client Library Extra  SUCCESS [0.010s]  
        39. [INFO] Android Google Cloud Messaging Server Library Extra  SUCCESS [0.010s]  
        40. [INFO] Android Google Play Services Extra ................ SUCCESS [0.460s]  
        41. [INFO] Android Google Play Licensing Extra ............... SUCCESS [0.297s]  
        42. [INFO] Android Extras - Apk Expansion .................... SUCCESS [0.006s]  
        43. [INFO] Android Google Play APK Expansion Extra - ZIP ..... SUCCESS [0.240s]  
        44. [INFO] Android Google Play APK Expansion Extra - Downloader  SUCCESS [0.314s]  
        45. [INFO] Android Tools ..................................... SUCCESS [0.004s]  
        46. [INFO] Android Annotations ............................... SUCCESS [0.007s]  
        47. [INFO] ------------------------------------------------------------------------  
        48. [INFO] BUILD SUCCESS  
        49. [INFO] ------------------------------------------------------------------------  
        50. [INFO] Total time: 5.277s  
        51. [INFO] Finished at: Mon Dec 31 16:42:23 CST 2012  
        52. [INFO] Final Memory: 24M/298M  
        53. [INFO] ------------------------------------------------------------------------  


      • 出现以上Q就代表 android-maven的初步环境构建完?br />
      • cd ~/.m2/ 到该目录下打开repository的文件夹卛_查看到已l配|好相关的Android环境?br />
    • 试android-maven
      • 下蝲可供l打包测试的例子代码 Download samples from the stable branch
      • 解压该项目,q入 jayway-maven-android-plugin-samples-b17572a 文g?/li>
        1. drwxrwxr-x  4 wuyexiong wuyexiong  4096 12?nbsp;31 15:49 apidemos-android-10/  
        2. -rw-rw-r--  1 wuyexiong wuyexiong   136 12?nbsp;19 10:25 .gitignore  
        3. drwxrwxr-x  4 wuyexiong wuyexiong  4096 12?nbsp;19 10:25 helloflashlight/  
        4. drwxrwxr-x  6 wuyexiong wuyexiong  4096 12?nbsp;19 10:25 libraryprojects/  
        5. -rw-rw-r--  1 wuyexiong wuyexiong 10173 12?nbsp;19 10:25 LICENSE.txt  
        6. drwxrwxr-x  5 wuyexiong wuyexiong  4096 12?nbsp;19 10:25 morseflash/  
        7. drwxrwxr-x 13 wuyexiong wuyexiong  4096 12?nbsp;19 10:25 native/  
        8. -rw-rw-r--  1 wuyexiong wuyexiong  7548 12?nbsp;19 10:25 pom.xml  
        9. -rw-rw-r--  1 wuyexiong wuyexiong   942 12?nbsp;19 10:25 README.txt  
        10. drwxrwxr-x  4 wuyexiong wuyexiong  4096 12?nbsp;19 10:25 scala/  
        11. drwxrwxr-x  5 wuyexiong wuyexiong  4096 12?nbsp;31 15:34 support4demos/  
      • 可以看到都是一些例子的代码?/li>
      • q时候可以进入具体的一个项目,比如q入support4demos
        1. -rw-rw-r--  1 wuyexiong wuyexiong 10630 12?nbsp;19 10:25 AndroidManifest.xml  
        2. -rw-rw-r--  1 wuyexiong wuyexiong  1909 12?nbsp;19 10:25 pom.xml  
        3. -rw-rw-r--  1 wuyexiong wuyexiong   377 12?nbsp;19 10:25 README.txt  
        4. drwxrwxr-x 10 wuyexiong wuyexiong  4096 12?nbsp;19 10:25 res/  
        5. drwxrwxr-x  3 wuyexiong wuyexiong  4096 12?nbsp;19 10:25 src/  
      • q是完整目的文件了
      • 打开模拟器,或者链接上手机Q执?nbsp;mvn clean install 卛_~该E序?/li>
      • 也可以只是执?span style="color: #3366ff;"> mvn package 来进行打包, 卛_在项目下生成一个target的目录,目录底下都是一些目标文?/li>
      • q两U默认都是以debug{֐的,更多待研I了。。?/li>
      • 最后执?nbsp;mvn android:deploy 卛_安装到模拟器或者手?/li>
      • ~译q安装是执行 mvn clean install android:deploy

        1. [INFO]                                                                           
        2. [INFO] ------------------------------------------------------------------------  
        3. [INFO] Building Android Support V4 Demos 1.0.0-SNAPSHOT  
        4. [INFO] ------------------------------------------------------------------------  
        5. [INFO]   
        6. [INFO] --- android-maven-plugin:3.5.0:deploy (default-cli) @ support4demos ---  
        7. [INFO] Waiting for initial device list from the Android Debug Bridge  
        8. [INFO] Found 1 devices connected with the Android Debug Bridge  
        9. [INFO] android.device parameter not set, using all attached devices  
        10. [INFO] Successfully installed /home/wuyexiong/Android/tool/maven/jayway-maven-android-plugin-samples-b17572a/support4demos/target/support4demos.apk to MX3ACA1ALGVA8Q1125_Meizu_M031  
        11. [INFO] ------------------------------------------------------------------------  
        12. [INFO] BUILD SUCCESS  
        13. [INFO] ------------------------------------------------------------------------  
        14. [INFO] Total time: 8.965s  
        15. [INFO] Finished at: Mon Dec 31 16:55:09 CST 2012  
        16. [INFO] Final Memory: 17M/146M  
        17. [INFO] ------------------------------------------------------------------------  


            本章到此?我也是刚研究q个Q因为发现github上面很多开源项目都是带有pom.xmlq个文g的,所以下了解一下,最好能深入一下?/div>
            
            循序渐进吧。等待研I更深入的东西,把笔记都记到q上?/div>


  • 其自然EVO 2014-04-11 18:56 发表评论
    ]]>
    Win7 64位操作系l安装android开发环?/title><link>http://www.aygfsteel.com/qileilove/articles/410921.html</link><dc:creator>其自然EVO</dc:creator><author>其自然EVO</author><pubDate>Wed, 12 Mar 2014 02:58:00 GMT</pubDate><guid>http://www.aygfsteel.com/qileilove/articles/410921.html</guid><wfw:comment>http://www.aygfsteel.com/qileilove/comments/410921.html</wfw:comment><comments>http://www.aygfsteel.com/qileilove/articles/410921.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/qileilove/comments/commentRss/410921.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/qileilove/services/trackbacks/410921.html</trackback:ping><description><![CDATA[<div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  <strong style="word-break: break-all; line-height: normal !important;">1.jdk</strong></div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  下蝲地址Qhttp://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  安装Q?/div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  使用默认安装目录(C:\Program Files\Java)Q一路next到最?/div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  配置环境变量Q?/div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  我的电脑--属?-高pȝ讄--高--环境变量</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  在Path后添加:;C:\Program Files\Java\jdk1.7.0_51\bin;</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  新徏CLASSPATHQ编辑:输入的gؓ“.”</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  以上Q如果安装目录不同,需要做相应的更?/div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  :</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  安装于配|结束后Q运?-cmd--javacQ如果看刎ͼ用法Qjavac ...之类的文字出玎ͼOK了,l箋下一?/div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  如果没有成功Q请?环境变量 配置</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  <strong style="word-break: break-all; line-height: normal !important;">2.Android SDK 以及 Eclipse</strong></div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  下蝲地址Qhttp://developer.android.com/sdk/index.html</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  下蝲Q?/div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  点击按钮 Download the SDK ADT Bundle for <a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">Windows</strong></u></a>Q然后勾选I have...Q选择64bitQ点击Download..按钮</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  安装Q直接解压即可,内含Eclipse开发环境以及最新的<a target="_self" style="word-break: break-all; color: #202859; line-height: normal !important;"><u style="word-break: break-all;"><strong style="word-break: break-all;">Android</strong></u></a> SDK</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  配置环境变量Q?/div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  在Path后添加:platform-tools的\径,比如QE:\Android\adt-bundle-windows-x86_64-20130219\sdk\platform-tools</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  如果需要升U或安装其他版本的SDKQ可以运行SDK Manager.exe</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  可能会遇C闪而过的情况,q个时候,可以扑ֈsdk\tools里面的android.batQ运行,可以看到相应的界面了,选择需要安装的</div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;">  OKQ基本上到这里就配|好开发环境了Q打开Eclipse可以开始开发androidE序了?/div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;"></div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff;"></div><div style="word-break: break-all; line-height: 21.60000228881836px; margin: 10px 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 11.818181991577148px; background-color: #ffffff; height: 21px; position: relative; width: 627.1875px;"></div><img src ="http://www.aygfsteel.com/qileilove/aggbug/410921.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/qileilove/" target="_blank">其自然EVO</a> 2014-03-12 10:58 <a href="http://www.aygfsteel.com/qileilove/articles/410921.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Installing Android Studiohttp://www.aygfsteel.com/qileilove/articles/409684.html其自然EVO其自然EVOMon, 10 Feb 2014 11:02:00 GMThttp://www.aygfsteel.com/qileilove/articles/409684.htmlhttp://www.aygfsteel.com/qileilove/comments/409684.htmlhttp://www.aygfsteel.com/qileilove/articles/409684.html#Feedback0http://www.aygfsteel.com/qileilove/comments/commentRss/409684.htmlhttp://www.aygfsteel.com/qileilove/services/trackbacks/409684.htmlInstalling Android Studio
    1. Download the Android Studio package from above.
    2. Install Android Studio and the SDK tools:

      Windows:

      1. Launch the downloaded EXE file, android-studio-bundle-<version>.exe.
      2. Follow the setup wizard to install Android Studio.

        Known issue: On some Windows systems, the launcher script does not find where Java is installed. If you encounter this problem, you need to set an environment variable indicating the correct location.

        Select Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and add a new system variable JAVA_HOME that points to your JDK folder, for exampleC:\Program Files\Java\jdk1.7.0_21.

      Mac OS X:

      1. Open the downloaded DMG file, android-studio-bundle-<version>.dmg.
      2. Drag and drop Android Studio into the Applications folder.

        Known issue: Depending on your security settings, when you attempt to open Android Studio, you might see a warning that says the package is damaged and should be moved to the trash. If this happens, go to System Preferences > Security & Privacy and under Allow applications downloaded from, select Anywhere. Then open Android Studio again.

      Linux:

      1. Unpack the downloaded Tar file, android-studio-bundle-<version>.tgz, into an appropriate location for your applications.
      2. To launch Android Studio, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh.

        You may want to add android-studio/bin/ to your PATH environmental variable so that you can start Android Studio from any directory.

    That's it! You're ready to start developing apps with Android Studio.

    Note: On Windows and Mac, the individual tools and other SDK packages are saved within the Android Studio application directory. To access the tools directly, use a terminal to navigate into the application and locate the sdk/directory. For example:

    Windows: \Users\<user>\AppData\Local\Android\android-studio\sdk\

    Mac: /Applications/Android\ Studio.app/sdk/

    For a list of some known issues, see tools.android.com/knownissues.

    Starting a Project


    When you launch Android Studio for the first time, you'll see a Welcome screen that offers several ways to get started:

    • To start building a new app, click New Project.

      This starts the New Project wizard, which helps you set up a project using an app template.

    • To import an existing Android app project, click Import Project.

      Note: If you previously developed your Android project with Eclipse, you should first use the new export feature in the ADT plugin to prepare your project with the new Gradle build system. For more information, read Migrating from Eclipse.

    For additional help using Android Studio, read Tips and Tricks.

    As you continue developing apps, you may need to install additional versions of Android for the emulator and other packages such as the Android Support Library. To install more packages, use the SDK Manager, which you can open from Android Studio by clicking SDK Manager  in the toolbar.

    菜鸟日记1-20130604 Q?/p>

    如何在没有安装过JAVA的WIN7 32位系l里安装和配|?Android Studio

    1Q?a target="_blank" style="word-wrap: break-word; outline-style: none; color: #336699;">http://developer.android.com/sdk/installing/studio.html 在这里下载WINDOWS版本的Android StudioQ在本地计算Z获得安装文gQandroid-studio-bundle-130.677228-windows.exeQ?/p>

    2Q运行安装文Ӟandroid-studio-bundle-130.677228-windows.exeQ在安装q程中会发现没有JDK,Ҏ提示下蝲q运行这个文Ӟjdk-7u21-windows-i586.exeQ?/p>

    3Q回到android-studio-bundle-130.677228-windows.exe的安装界面,点下一步l完成安装;

    4Q初ơ运?Android Studio 可能会无法启动,下面重点讲一下我的修改;不同的系l可能做法不太一P

    计算机属?高-环境变量-pȝ变量新徏Q?/p>变量名:ANDROID_STUDIO_JDK 变量|C:\Program Files\Java\jdk1.7.0_21

    5Q在C:\Program Files\Android\android-studio\bin 下找到studio.batQ修改:

    SET BITS= ?SET BITS=32

    6Q运?Android Studio Q等5U左叻I出现了是否导入原来配|的对话框;直接点ok;

    7,启动正常Q?/p>



    其自然EVO 2014-02-10 19:02 发表评论
    ]]>
    Android开发环境搭建全E演C?jdk+eclipse+android sdk)http://www.aygfsteel.com/qileilove/articles/409626.html其自然EVO其自然EVOSat, 08 Feb 2014 10:31:00 GMThttp://www.aygfsteel.com/qileilove/articles/409626.htmlhttp://www.aygfsteel.com/qileilove/comments/409626.htmlhttp://www.aygfsteel.com/qileilove/articles/409626.html#Feedback0http://www.aygfsteel.com/qileilove/comments/commentRss/409626.htmlhttp://www.aygfsteel.com/qileilove/services/trackbacks/409626.html

    Android开发环境搭建全E演C?jdk+eclipse+android sdk)

             全程演示android开发环境的搭徏q程Q无需配置环境变量。所有Y仉是写该文章时最新版?br />

    一 相关下蝲

    (1) java JDK下蝲:

    q入该网? http://java.sun.com/javase/downloads/index.jsp(或者直?a target="_blank" style="color: #f87070;">点击下蝲)如下?
    选择 Download JDK 只下载JDKQ无需下蝲jre. 

    (2)eclipse下蝲

       q入该网? http://www.eclipse.org/downloads/(或者直接点M?BT下蝲    HTTP下蝲) 如下?


    我们选择W一?即eclipse IDE for java EE Developers)

    (3)下蝲Android SDK

       说明: Android SDK两种下蝲版本Q一U是包含具体版本的SDK的,一U是只有升工具Q而不包含具体的SDK版本Q后一U大?0多MQ前一U?0多M?/p>

        完全版下?/a>(android sdk 2.1 r01)     升版下?/a>(使用q个Q本例子是使用q个q里面不包含具体版本Q想要什么版本在Eclipse里面升񔞮p)

    ?nbsp;软g安装

       (1)安装jdk 6u19   安装完成卛_Q无需配置环境变量

       (2)解压eclipse       eclipse无需安装Q解压后Q直接打开p

       (3)解压android sdk     q个也无需安装Q解压后供后面?/p>

       (4)最l有三个文g夹,如下?

       

    ?nbsp;Eclipse配置

       1 安装android 开发插?/p>

         (1)打开Eclipse, 在菜单栏上选择 help->Install New SoftWare 出现如下界面:


        点击 Add按钮,出现如下界面


         输入|址: https://dl-ssl.google.com/android/eclipse/    (如果出错Q请httpsҎhttp)

         名称: Android (q里可以自定?

       点击OKQ将出现如下界面


    点击 Next按钮 Q出现如下界?


      

    点击Next按钮Q出现如下界?


    选择 I accept the terms of the license agreements   点击Next,q入安装插g界面

    安装完成后,出现如下界面


    点击Yes按钮Q重启Eclipse

    2 配置android sdk

         (1)点击菜单window->preferences,q入如下界面


       选择你的android SDK解压后的目录Q选错了就会报错,q个是升U工P目前q没有一个版本的SDK

    Q?Q升USDK版本,选择菜单 window->Android sdk and avd manager 出现如下界面

          

       选择update all按钮Q出现如下界?/p>


    选择左边的某一,点击accept表示安装Q点击reject表示不安装,我这里只选了SDK 2.1 和samples for api 7 , 自己可以L自定义,定后,选择install按钮Q进入安装界面如?

    安装完成如下:

    (3)新徏AVD(android vitural device)    和上面一Pq入android sdk and avd manager,选中Vitural Devices 在点击New按钮

    点击New按钮后,q入如下界面:

    名称可以随便取,target选择你需要的SDK版本QSD卡大自定义,点击 Create AVD,得到如下l果

    如上昄创徏AVD完毕





    3 新徏Android目

    (1)选择菜单file->new->other q入如下界面:

    选择新徏Android Project目Q点击Next按钮Q进入如下界?/p>


    名称自定义,应用E序名自定义Q报名必d含一个点以上Qmin SDK version里面必须输入整数

    点击Next出现如下界面:


    ? 若有错误? Project ... is missing required source folder: 'gen' ,则将gen->Android.Test->R.javaq个文g删掉QEclipse会ؓ我们重新生成q个文gQƈ且不会报错?/p>

    (3)配置q行

       右键目->Run as -> Run Configuration q入如下界面:
    该界面,点击Browse 按钮Q选择你要q行的项?/p>

    选择Target切换C下界?/p>


    该界面选择q行的AVDQ将AVD前面的方框设|ؓ选择状态?/p>

    (4)试目q行

       右键目名称->run as ->Android Application 卛_启动q行该AndroidE序Q如下所C?


    正在q入


    试E序q行l果

    ?nbsp;l束?/p>

           xQandroid开发环境搭建完毕,有问题请留言。在q里要注意,我这里只是下载了android sdk r4升工具Q没有下载具体的SDKQ而是通过在Eclipse里面的Android Sdk理工具升的,你也可以直接下蝲具体的SDK版本Q如: Android sdk 2.1 r1 上面有这个的下蝲链接Q但我Q务用升工具更好?/p>



    其自然EVO 2014-02-08 18:31 发表评论
    ]]>
    վ֩ģ壺 ʡ| | ɽ| ɽ| ̩| ǰ| Դ| ˷| | | | | | üɽ| ԭ| | IJ| | | ˰| | | ӱʡ| Ӣ| | Ͳ| ͨ| | ũ| | ˮ| | | ˫| ԭ| | | | | | |