issue with first time compiling
Closed this issue · 5 comments
I'm trying to see if i can use your library to put out different variations of an app I'm working on, but I'm having issues even getting the first one to build.
Traceback (most recent call last):
File "C:\Users\Alex\Documents\Work\python\test_app\app_test\build_test.py", line >20, in
apk = project.build()
File "build\bdist.win32\egg\android\build.py", line 550, in build
self.compile()
File "build\bdist.win32\egg\android\build.py", line 538, in compile
self.code = self.platform.compile(**kwargs)
File "build\bdist.win32\egg\android\build.py", line 281, in compile
self.generate_r(manifest, resource_dir, source_gen_dir)
File "build\bdist.win32\egg\android\build.py", line 160, in generate_r
include=[self.framework_library]))
File "build\bdist.win32\egg\android\tools.py", line 141, in call
return Program.call(self, args)
File "build\bdist.win32\egg\android\tools.py", line 83, in call
process.stdout.read())
ProgramFailedError: C:/Program Files (x86)/Android/android-sdk\build-tools\aapt.exe package -m -M >C:\Users\Alex\Documents\Work\python\test_app\app_test\AndroidManifest.xml -S >C:\Users\Alex\Documents\Work\python\test_app\app_test\res -I C:/Program Files (x86)/Android/android-sdk\platforms\android-17\android.jar -J C:\Users\Alex\Documents\Work\python\test_app\app_test\gen failed with code 1
I've pored over the code several times trying to figure out where the issue is, but best I can come up with is that it might be an issue with aapt. I don't think it's an issue with my project, since I've already released it to the Play Store.
My code so far is just:
from android.build import AndroidProject
import ossdk_path = 'C:/Program Files (x86)/Android/android-sdk'
project = AndroidProject('AndroidManifest.xml',sdk_dir = sdk_path)
apk = project.build()
apk.sign('keystore','alias','name')
apk.align()
Hi
This issue appeared to me after I updated the ADT to version 22. This occurs because on ADT 22 they changed apk builder location. Before it was located in "android-sdk-folder/tools", now on v22 it is "android-sdk-folder/build-tools/..." but they assembled it in a different way so simply changing location in script won't work. I didin't figured out how to solve it yet.
Thanks, I still haven't been able to find a workaround, so I ended up having to do things the old-fashioned way, unfortunately. Has Google released any statements about how the new build process works? From what I understand, they are moving towards gradle builds, but there's still support for ant.
Also, I tried re-implementing the code using the old ADT and I still had the same issues. I've tried v19, v16, and v14 that I pulled from the Google Android development server, but it hasn't worked.
Different things have changed - the latest git should now run fine with SDK rev 22.
Also note this (a new SDK component needs to be installed to get all command line tools):
http://stackoverflow.com/questions/16620655/i-have-updated-android-sdk-to-rev-22-yesterday-and-there-is-no-apkbuilder-in-to
The apkbuilder scripts are now shipped with py-androidbuild. I haven't tested them on windows though, so there might be issues still with my blind-changes:
Awesome. I've moved onto a different project for work, but I should be returning to the multi-build project in the near future. If there's any problems, I'll open up a new issue. Thanks!