找不到版本标记字符串.文件必须更新 [英] Failed to find version-tag string. File must be updated
本文介绍了找不到版本标记字符串.文件必须更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用命令为Android创建APK
I am trying to create apk for android using the command
./build.py --package org.test.hideapp --name hideapp --version 1.0 --dir /home/home/Downloads/Projects/test5/hideapp debug adb installd
但是,我收到了错误消息
but, I am getting the error
./build.py --package org.test.hideapp --name hideapp --version 1.0 --dir /home/home/Downloads/Projects/test5/hideapp debug adb installd
Updated project.properties
Updated local.properties
----------
build.xml: Failed to find version-tag string. File must be updated.
In order to not erase potential customizations, the file will not be automatically regenerated.
If no changes have been made to the file, delete it manually and run the command again.
If you have made customizations to the build process, the file must be manually updated.
It is recommended to:
* Copy current file to a safe location.
* Delete original file.
* Run command again to generate a new file.
* Port customizations to the new file, by looking at the new rules file
located at <SDK>/tools/ant/build.xml
* Update file to contain
version-tag: custom
to prevent file from being rewritten automatically by the SDK tools.
----------
Updated file ./proguard-project.txt
Traceback (most recent call last):
File "./build.py", line 412, in <module>
make_package(args)
File "./build.py", line 304, in make_package
make_pythonzip()
File "./build.py", line 132, in make_pythonzip
python_files = [x for x in listfiles(d) if select(x)]
File "./build.py", line 96, in listfiles
for item in os.listdir(d):
OSError: [Errno 2] No such file or directory: '/home/home/Downloads/python-for-android/src/private/lib/python2.7'
推荐答案
尽管您不尝试做一些神奇的事情,而只是创建一个apk
,请考虑使用
As much as you don't try to make something magical, but only create an apk
, consider buildozer
所以您需要这样做:
- 通过
pip install buildozer
安装
- 转到您的项目目录,并使用
buildozer init
对其进行初始化.它在项目目录中创建名为buildozer.spec
的文件,您可以通过两种方式指定版本:在main.py中使用__version__
指令(version.regex
和version.filename
),或在version
指令中显式地指定版本. -
创建一个apk并(可选)将其部署到某些连接的设备上:
- Install it with
pip install buildozer
- Go to your project directory and initialize it with
buildozer init
. It creates the file namedbuildozer.spec
in your project directory, where you can specify the version in two ways: with__version__
directive in your main.py (version.regex
andversion.filename
), or explicitly inversion
directive Create an apk and (optionally) deploy it on some connected device with:
buildozer android debug deploy run
默认情况下,您将在bin
目录中具有一个APK文件.
By default you will have an apk file in bin
directory.
这篇关于找不到版本标记字符串.文件必须更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文