既然要做项目发布,那么离不了软件签名,android不会安装任何一个没有签名的apk,那为什么我一直写的软件都可以安装的呢?那时因为你用的是android自带的默认调试用的数字证书---签名
方法有两种:
第一种:
<!--[if !supportLists]-->1) <!--[endif]-->首先要找到你的android的调试debug.keystore的所在位置
<!--[if !supportLists]-->a) <!--[endif]-->打开eclipse-window-preference-Android-build
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter" /> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0" /> <v:f eqn="sum @0 1 0" /> <v:f eqn="sum 0 0 @1" /> <v:f eqn="prod @2 1 2" /> <v:f eqn="prod @3 21600 pixelWidth" /> <v:f eqn="prod @3 21600 pixelHeight" /> <v:f eqn="sum @0 0 1" /> <v:f eqn="prod @6 1 2" /> <v:f eqn="prod @7 21600 pixelWidth" /> <v:f eqn="sum @8 21600 0" /> <v:f eqn="prod @7 21600 pixelHeight" /> <v:f eqn="sum @10 21600 0" /> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /> <o:lock v:ext="edit" aspectratio="t" /> </v:shapetype><v:shape id="_x0000_i1038" type="#_x0000_t75" style='width:415.5pt; height:98.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->b) <!--[endif]-->注意一定要看看这个路径中有没有空格啊,如果有空格的话,要把你的.android文件夹拷贝到别的地方,只要不让路径中存在空格即可(步骤)
<!--[if !supportLists]-->2) <!--[endif]-->打开cmd dos界面
<!--[if !supportLists]-->a) <!--[endif]-->进入到你即将存储keystore文件的文件夹下面,如:
<!--[if gte vml 1]><v:shape id="_x0000_i1037" type="#_x0000_t75" style='width:123.75pt;height:14.25pt;visibility:visible; mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image003.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->b) <!--[endif]-->先输入keytool看有没有这个命令,有的话进行如下操作
<!--[if !supportLists]-->c) <!--[endif]--><!--[if gte vml 1]><v:shape id="图片_x0020_7" o:spid="_x0000_i1036" type="#_x0000_t75" style='width:415.5pt; height:177.75pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image005.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->d) <!--[endif]-->问你正确吗?你输入:Y
<!--[if !supportLists]-->3) <!--[endif]-->现在去你的文件夹下面看看是不是生成了一个文件
<!--[if gte vml 1]><v:shape id="图片_x0020_10" o:spid="_x0000_i1035" type="#_x0000_t75" style='width:315.75pt;height:85.5pt; visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image007.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->4) <!--[endif]-->这就是数字证书了
<!--[if !supportLists]-->5) <!--[endif]-->接下来就是给项目签名了
<!--[if !supportLists]-->a) <!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1034" type="#_x0000_t75" style='width:414.75pt;height:233.25pt; visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image009.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->b) <!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1033" type="#_x0000_t75" style='width:415.5pt;height:301.5pt; visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image011.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->c) <!--[endif]--><!--[if gte vml 1]><v:shape id="图片_x0020_19" o:spid="_x0000_i1032" type="#_x0000_t75" style='width:415.5pt; height:301.5pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image013.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->d) <!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1031" type="#_x0000_t75" style='width:415.5pt;height:298.5pt; visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image015.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
第二种:
<!--[if !supportLists]-->1) <!--[endif]--><!--[if gte vml 1]><v:shape id="图片_x0020_13" o:spid="_x0000_i1030" type="#_x0000_t75" style='width:414.75pt;height:233.25pt; visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image009.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->2) <!--[endif]--><!--[if gte vml 1]><v:shape id="图片_x0020_16" o:spid="_x0000_i1029" type="#_x0000_t75" style='width:415.5pt;height:301.5pt; visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image011.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->3) <!--[endif]--><!--[if gte vml 1]><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe"> <v:stroke joinstyle="miter" /> <v:path gradientshapeok="t" o:connecttype="rect" /> </v:shapetype><v:shape id="_x0000_s1027" type="#_x0000_t202" style='position:absolute; left:0;text-align:left;margin-left:224.3pt;margin-top:66.35pt;width:174.05pt; height:23.8pt;text-indent:0;z-index:2' /><![endif]--><!--[if !vml]-->
<!--[endif]--><!--[if !mso]-->
|
<!--[if !supportLists]-->4) <!--[endif]--><!--[if gte vml 1]><v:shape id="图片_x0020_4" o:spid="_x0000_i1027" type="#_x0000_t75" style='width:415.5pt;height:301.5pt; visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image020.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->5) <!--[endif]--><!--[if gte vml 1]><v:shape id="图片_x0020_22" o:spid="_x0000_i1026" type="#_x0000_t75" style='width:415.5pt;height:298.5pt; visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image015.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->6) <!--[endif]-->ok
<!--[if !supportLists]-->1. <!--[endif]-->将.android文件夹拷贝到没空格的任意目录下
<!--[if !supportLists]-->2. <!--[endif]-->右键我的电脑à属性à高级à环境变量à新建
<!--[if gte vml 1]><v:shape id="图片_x0020_25" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:260.25pt;height:111.75pt; visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image023.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if !supportLists]-->3. <!--[endif]-->确定
<!--[if !supportLists]-->4. <!--[endif]-->打开你的eclipse-window-preference-Android-build
看看是不是你设定的变量值