创建Android应用发布模式 [英] Create Android app release mode
问题描述
我要创造我在释放模式Android应用程序。我也建议出口从Eclipse中。 Android的工具 - >导出未分配(当时签了字对准它等),我虽然出口会给我发布模式的应用程序。我查了磁盘和.apk文件是一样的大小对视了一眼,我得到的时候我在Eclipse中正常编译。
另外我在模拟器由> ADB安装myapp.apk安装了它,然后我试图附加在Eclipse调试器的应用程序,果然打我的断点。所以,我相信我有的确是一个调试版本。现在的问题是我怎么能签署和递交到市场上之前创建的Eclipse我的应用程序的发布模式下版本?
修改
如果我登录它时,出口,以及从Eclipse中运行时,可调试标志是关闭的。除非我明确地将其设置为true的清单应用程序部分。看来调试/释放模式只是一个开/关的标志。不这样做比任何东西,我可以设置断点和调试版本。所得的apk是相同的大小。
cxLog.e(令牌,可调试=+((context.getPackageManager()getApplicationInfo(comp.getPackageName(),0).flags和放大器; = ApplicationInfo。 FLAG_DEBUGGABLE)= 0))!;
10-28 14:46:12.479:ERROR /令牌(1856年):可调试=假
现在的问题是我怎么可以创建一个从Eclipse的发行模式版本我的应用程序的
检查了这一点:编译在释放模式的应用程序
安卓工具>导出未签名的应用程序包
一个真正的调试版本支持。开发人员不再需要到Android补充:可调试属性标签在清单 - 构建工具会自动添加属性。在Eclipse / ADT,所有增量编译被认为是调试版本,所以工具插入的android:可调试=真。当导出一个签名的发布版本,该工具不添加属性。在蚂蚁,蚂蚁一调试命令自动插入了android:可调试=true属性,而蚂蚁版本不。如果机器人:可调试=true是手动设置,那么蚂蚁释放将实际做调试版本,而不是一个发布版本
I want to create my Android app in release mode. I did the suggested Export from Eclipse. Android tools -> Export Unassigned ( then signed it aligned it etc ) I though the export would give me release mode app. I checked on disk and the .apk is just the same size as the one I get when I normally compile in Eclipse.
Further I installed it in the emulator by >adb install myapp.apk then I tried to attach to the application in the Eclipse debugger and sure enough it hit my breakpoint. So I'm convinced I have indeed a debug version. The question is how can I create release mode version of my application from Eclipse before signing and submitting to the market place ?
Edit
If I log it the debuggable flag is off when exported, as well when running from Eclipse. Unless I explicitly set it to true in the Manifest application section. It seems the debug / release mode is just a flag on / off. Doesn't do anything more than that, I can set breakpoints and debug both versions. The resulting .apk is the same size.
cxLog.e( "TOKEN", " Debuggable=" + (( context.getPackageManager().getApplicationInfo( comp.getPackageName(), 0 ).flags &= ApplicationInfo.FLAG_DEBUGGABLE ) != 0 ) );
10-28 14:46:12.479: ERROR/TOKEN(1856): Debuggable=false
The question is how can I create release mode version of my application from Eclipse
Check this out : Compile the application in the release mode
Android Tools > Export Unsigned Application Package
Support for a true debug build. Developers no longer need to add the android:debuggable attribute to the tag in the manifest — the build tools add the attribute automatically. In Eclipse/ADT, all incremental builds are assumed to be debug builds, so the tools insert android:debuggable="true". When exporting a signed release build, the tools do not add the attribute. In Ant, a ant debug command automatically inserts the android:debuggable="true" attribute, while ant release does not. If android:debuggable="true" is manually set, then ant release will actually do a debug build, rather than a release build.
这篇关于创建Android应用发布模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!