phonegap android构建成功后APK文件存储在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20614437/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is APK file stored after phonegap android build is successful?
提问by Stan
I don't understand where can I find my package that is compiled so I can copy it into my device and install it from there.
我不明白在哪里可以找到我编译的包,以便我可以将它复制到我的设备中并从那里安装它。
What I did is create an empty project, then made build on it with no errors, however, I cannot find .apk
file.
我所做的是创建一个空项目,然后在没有错误的情况下进行构建,但是,我找不到.apk
文件。
\platforms\android\bin
has HelloWorld-debug.apk
but I don't want to debug package but a normal one.
\platforms\android\bin
有HelloWorld-debug.apk
但我不想调试包而是一个普通的包。
I tried phonegap build android
as well as phonegap build android local
and no difference was found between these two commands. Also, why is it even named HelloWorld
if I named my project lololol
?
我也试过了phonegap build android
,phonegap build android local
在这两个命令之间没有发现任何区别。另外,HelloWorld
如果我命名我的项目,为什么它甚至命名lololol
?
采纳答案by Michael Marvick
Are you using eclipse? If so, take a look at this tutorial. This will allow you to export to a .apk file.
你在使用日食吗?如果是这样,请查看本教程。这将允许您导出到 .apk 文件。
回答by jgarciabt
You can change the name of the app after to create the project, in the file:
您可以在创建项目后更改应用程序的名称,在文件中:
ProjectFolder/www/config.xml
项目文件夹/www/config.xml
After that, you have to build again the project. If you want the release version, go to
之后,您必须再次构建项目。如果您想要发布版本,请转到
ProjectFolder/platforms/android/cordova
项目文件夹/平台/安卓/科尔多瓦
and then execute the command:
然后执行命令:
cordova build --release
科尔多瓦构建--发布
This creates an unsigned release APK at ProjectFolder/platforms/android/bin folder, called YourAppName-release-unsigned.apk.
这会在 ProjectFolder/platforms/android/bin 文件夹中创建一个未签名的发布 APK,名为 YourAppName-release-unsigned.apk。
回答by james-geldart
Phonegap 5.4.0 puts them in platforms/android/build/outputs/apk
Phonegap 5.4.0 将它们放在platforms/android/build/outputs/apk
I ran phonegap build --release
to do this. Still trying to figure all this out however!
我跑来phonegap build --release
做这件事。然而,仍然试图弄清楚这一切!
回答by Tony B
Check out platforms/android/build.xml for where "HelloWorld" comes from, maybe. In my case, I have a line that says
查看platforms/android/build.xml,了解“HelloWorld”的来源,也许吧。就我而言,我有一行说
<project name="CordovaApp" default="help">
and my app gets named "CordovaApp-release.apk", instead of what I have in config.xml. I assume the "cordova platform add android" is doing something slightly wrong, but not entirely sure.
并且我的应用程序被命名为“CordovaApp-release.apk”,而不是我在 config.xml 中的名称。我认为“cordova platform add android”做的事情有点不对,但并不完全确定。
回答by trydent
I am guessing they moved the location of the apk again. Here is my version and the new location:
我猜他们再次移动了 apk 的位置。这是我的版本和新位置:
>phonegap -v
8.0.0
>phonegap -v
8.0.0
location of apk after
之后的apk位置
>phonegap build android --release
>phonegap 构建 android --release
[project_folder]\platforms\android\app\build\outputs\apk\release
[project_folder]\platforms\android\app\build\outputs\apk\release
Note the extra \app folder.
注意额外的 \app 文件夹。
回答by Khaled Osman
in the newest versions the apk file should be located at /platforms/android/app/build/outputs/apk/release/
在最新版本中,apk 文件应位于 /platforms/android/app/build/outputs/apk/release/