当前位置:编程学习 > wap >>

怎样将两个apk打包进一个apk里?

--------------------编程问答-------------------- 应该可以的,帮你顶, 顺便学习下,加个命令就行的 --------------------编程问答-------------------- 放到raw目录中,然后释放到sd卡上,然后一个一个装 --------------------编程问答-------------------- --------------------编程问答--------------------
引用 1 楼 yongyuandeni 的回复:
应该可以的,帮你顶, 顺便学习下,加个命令就行的

加哪个命令呢?偶不清楚呀:) --------------------编程问答--------------------
引用 2 楼 drsmart 的回复:
放到raw目录中,然后释放到sd卡上,然后一个一个装

能详细介绍一下吗?谢了 --------------------编程问答-------------------- 单纯的这样装肯定是不可以的,因为相当于两个程序,你需要做安装程度的时候把二者放到一起 --------------------编程问答-------------------- 可以这样,比如a.apk,b.apk这两个,你的主程序是a.apk,那你把b.apk重名为b.mp3,然后放到a的assets目录下(因为assets目录对文件有大小限制,所以要命名为mp3),a安装,运行a,a初始化时将assets下的b.mp3复制到sd卡目录下,然后重命名为b.apk,再去安装b(sd卡目录下的这个b。apk),就可以了。 --------------------编程问答-------------------- 估计是不行,把两个apk的功能合并不好吗? --------------------编程问答--------------------
引用 5 楼 kinglqmm 的回复:
引用 2 楼 drsmart 的回复:

放到raw目录中,然后释放到sd卡上,然后一个一个装

能详细介绍一下吗?谢了


放到工程/res/raw文件夹,即可,如果你的文件小于1MB可以放到assets文件夹,但是大于1MB是无法读取的 --------------------编程问答--------------------          两个apk 程序就是两个 跟你另外一个根本没有关联     我虽然不知道你要实现什么功能   我就乱猜下吧        你是不是一个应用程序做为数据 或者数据想关联的   另外一个程序就是要得到刚刚第一个的数据 或者其他的支持。          --------------------编程问答-------------------- 没有问题的,你可以把A.apk嵌入B.apk,然活运行时把他释放出来安装好了 --------------------编程问答-------------------- 不就是木马一样的存在么,如果能隐匿安装过程就更好了 --------------------编程问答-------------------- 能放jar,你要不打包成jar试试? --------------------编程问答-------------------- 打成jar包用不了 --------------------编程问答-------------------- 把其中的一个设置成library

http://developer.android.com/guide/developing/projects/projects-eclipse.html


Setting up a Library Project

A library project is a standard Android project, so you can create a new one in the same way as you would a new application project.

When you are creating the library project, you can select any application name, package, and set other fields as needed, as shown in figure 1.

Next, set the project's properties to indicate that it is a library project:

In the Package Explorer, right-click the library project and select Properties.
In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
Select the "is Library" checkbox and click Apply.
Click OK to close the Properties window.
The new project is now marked as a library project. You can begin moving source code and resources into it, as described in the sections below.

You can also convert an existing application project into a library. To do so, simply open the Properties for the project and select the "is Library" checkbox. Other application projects can now reference the existing project as a library project. --------------------编程问答-------------------- 改b.apk的名字
然后作为资源来安装吧 --------------------编程问答-------------------- 路过 学习学习
--------------------编程问答-------------------- 路过学习   --------------------编程问答-------------------- 估计是a程序里面的某功能需要掉b程序,又怕用户没装b程序就用不了,所以都一起安装吧。我以前也遇到类似问题,最后找到b的源码合进来才解决。 --------------------编程问答-------------------- 同问。 我有连个app, 一个是android sdk 写的, 另一个是android sdk 写的。 两个要一起使用。 有什么办法打包成一个apk, 让用户安装时 只有一个进度条, 就想安装一个apk一样?
--------------------编程问答-------------------- 同问。 我有连个app, 一个是android sdk 写的, 另一个是flex sdk 写的。 两个要一起使用。 有什么办法打包成一个apk, 让用户安装时 只有一个进度条, 就想安装一个apk一样? 上贴写错了,--!! --------------------编程问答-------------------- 利用工具,可以实现! --------------------编程问答-------------------- 直接合并试试。
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk

不行的话,再试试把apk先合成一个MODULE,再加到一个package里面

--------------------编程问答-------------------- 过来学习下期待答案阿 --------------------编程问答-------------------- 关注, 没这样玩过 --------------------编程问答-------------------- 期待高手解决此问题 --------------------编程问答--------------------
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,