简体   繁体   English

适用于Android的python软件包,用于制作APK

[英]python for android package for making an APK

i have ran the command : 我已经运行了命令:

./build.py --dir ~/utils/helloworld --package org.test --name "Hello2" --version 1.0 debug installd ./build.py --dir〜/ utils / helloworld --package org.test --name“ Hello2”-版本1.0调试已安装

and i saw an APK in bin folder but still the output has been stopped at the following last sentence so i dont get it that what should i do with this process and how much time it will take to complete or it is completed..please tell me what should i do after this sentence because this is not the end of the process.. 而且我在bin文件夹中看到一个APK,但是输出仍然在下面的最后一句话停止,所以我不明白我应该如何处理此过程以及需要多少时间才能完成或完成。我这句话之后我该怎么办,因为这还没有结束。

-post-build: -构建后:

debug: 调试:

BUILD SUCCESSFUL Total time: 7 seconds Buildfile: /home/kajal/python-for-android/dist/default/build.xml 成功建立总时间:7秒构建文件:/home/kajal/python-for-android/dist/default/build.xml

-set-mode-check: -set-mode-check:

-set-debug-files: -set-debug-files:

install: [echo] Installing /home/kajal/python-for-android/dist/default/bin/Hello2-1.0-debug.apk onto default emulator or device... install:[echo]将/home/kajal/python-for-android/dist/default/bin/Hello2-1.0-debug.apk安装到默认模拟器或设备上...

 [exec] error: device not found
 [exec] error: device not found
 [exec] error: device not found
 [exec] - waiting for device -

It seems to have successfully built the APK file. 似乎已成功构建了APK文件。 It is automatically trying to install it on either an android device that is connected to the computer via USB, or on an android emulator set up on the computer itself. 它会自动尝试将其安装在通过USB连接到计算机的android设备上,或者安装在计算机本身设置的android模拟器上。 However, it cannot find either of the two so it would wait forever until you connect an android device. 但是,它找不到两者中的任何一个,因此它将永远等待直到您连接android设备。 You have a few choices: 您有几种选择:

  1. Plug an Android device into the computer: Make sure before you do that it is in debug mode (go to Settings->Applications->Development->USB debugging), and that it allows installation of third-party applications (go to Settings->Applications->Unknown sources). 将Android设备插入计算机:在执行操作之前,请确保其处于调试模式(转到“设置”->“应用程序”->“开发”->“ USB调试”),并且它允许安装第三方应用程序(转到“设置”- >应用程序->未知来源)。 Your android device might have a slightly different settings location, but it shouldn't be difficult to find. 您的android设备的设置位置可能略有不同,但并不难找到。 Finally, if it does not work automatically when you plug in the phone, then you probably need to download and install the correct drivers for your phone. 最后,如果在插入电话后无法自动运行,则可能需要下载并安装适用于您电话的正确驱动程序。
  2. Set up an emulator: To do this you will need to have installed the Android SDK. 设置模拟器:为此,您将需要安装Android SDK。 If you are in Eclipse look for a button at the top that has an Android on it. 如果您使用的是Eclipse,请在顶部寻找一个带有Android的按钮。 Otherwise search for a program called "AVD Manager". 否则,搜索名为“ AVD Manager”的程序。 I think you can also access it from the Android SDK program. 我想您也可以从Android SDK程序访问它。
  3. Install the APK on the phone manually. 手动在手机上安装APK。 This may actually be (initially) the most convenient method. 实际上,这可能是(最初)最方便的方法。 Simply close the program if you want, and then copy the generated APK file to your phone. 只需关闭该程序即可,然后将生成的APK文件复制到您的手机中。 Then use a file browser on your phone to open the file and install it (you will need to have enabled installation of third-party applications as before). 然后使用手机上的文件浏览器打开并安装文件(您将需要像以前一样启用第三方应用程序的安装)。

Persevere! 坚持不懈!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM