My Setup:
VM VirtualBox on windows 7 home p.
Guest - Linux Ubuntu 14.04
I have installed buildozer and dependencies and can run buildozer android debug and get an apk in the bin folder of the root project directory.
I have some questions that are killing me.
Why is it when I call buildozer android release, no apk gets placed in the bin folder in the project root directory. Instead I find the release apk in .buildozer......dist/mygame/release.unsigned-apk? Is it suppose to be there?
I can use keytool to create a .keystore file and run jarsinger... but, I don't have DIR ~/.buildozer/android/platform/android-sdk-21/build-tools/22.0.1/zipalign -v 4. If buildozer downloaded the android sdk and ndk, should I have zipalign somewhere? How can I build a debug apk if I didn't have the sdk and ndk? So how come I don't see an sdk or ndk folder anywhere on my system?
In my spec file, I use requirements kivy=master. Is that ok?
PS, I know the sdk and ndk were downloaded because it took forever to get those but where are they?
The release apk doesn't go to the bin folder in root, but by default goes to the bin folder in distrb directory, which is in the hidden .buildozer path (in the root project folder). Only the debug release goes to the bin folder that gets created in the project root.
The NDK and SDK were found in the hidden .buildozer path located in my Home directory. Linux Ubuntu is one system that would be superior in the game "hide-n-seek"...if it were human..... Which might happen given the way mankind constant feed human life and soul into machines. :D
Related
I am getting following error with while creating apk using buildozer.
I an using Ubuntu 16.0.4 and running as root
Check that aidl can be executed
Search for Aidl
Run /root/.buildozer/android/platform/android-sdk-20/build-tools/20.0.1/aidl
Cwd None
Aidl cannot be executed
You might have missed to install 32bit libs
Check http://buildozer.readthedocs.org/en/latest/installation.html
Check configuration tokens
You don't really need to run buildozer with root. The .buildozer folder will be created under $HOME e.g. /home/user-name/.buildozer
With regards to the missing aidl file,
you need to run android in /root/.buildozer/android/platform/android-sdk-20/tools/ to update Android SDK, and aidl will be installed. You might have to run this a few times until you see a folder build-tools (/root/.buildozer/android/platform/android-sdk-20/build-tools) with subfolders 19.1.0, 23.0.1, etc.
cd /root/.buildozer/android/platform/android-sdk-20/tools/
./android
My android studio said it wanted to update. But when I did I tried to update it but it wouldn't work so I had to launch:
C:\Users\username\AppData\Local\Android\sdk\tools\android.bat to install other packages. But the NDK file wouldn't update, so I manually downloaded it from:
https://developer.android.com/ndk/downloads/index.html#download
Now I have this zip file and where should I extract the folder? Grateful for any help!!
The folder name is android-ndk-r13b.
Yes, rename the extracted folder android-ndk-r13b(probably the exact name will be outdated someday soon) to ndk-bundle (you can put the NDK [and SDK for that matter] anywhere, and leave the name alone if you want {do not do this, I'm sure seen one case of hard-coded sub-path}), then, make the settings point to the location where you put it.
Android Studio, File menu | Project Structure Ctrl+Alt+Shift+s(short-cut: ctrl+Alt+Shift+s):
It might also be helpful to you to set/check the following environmental variables:
NDK_HOME=C:\Android\sdk\ndk-bundle
NDK_MODULE_PATH=C:\Android\sdk\ndk-bundle
EXTRA stuff:
While were doing environmental variables (belt-and-braces for SDK):
ANDROID_HOME=C:\Android\sdk
For JDK:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_112
JAVA_PATH=C:\Program Files\Java\jre1.8.0_112\bin
JDK is the Java Development Kit.
JRE is the Java Run-time Environment.
If your tight on memory (RAM) for Gradle (700 Megabytes is about as low as you can go, other tools like monitor.bat use this variable too, it's ubiquitous) (clearly you want to make it as big a possible, without swapping making it extremely slow to build {note the underscore VERY important ! [it's a reserved name space conflict operator, don't ask me to explain it's VERY complicated !]}):
_JAVA_OPTIONS=-Xmx700m
Some Links
Setting up for Android NDK development
Add C and C++ Code to Your Project
Getting Started with the NDK
Using C and C++ Code in an Android App with the NDK
Download the .zip file. Start the installation through SDK manager. Go to %userprofile%\AppData\Local\Android\sdk\ndk-bundle and copy .installer folder to desktop and cancel the downloading in SDK manager. Open .installer folder and open .installationdata file and check the folder in which the file is being downloaded like: %userprofile%\AppData\Local\Temp\PackageOperation01. Copy downloaded .zip file to the folder PackageOperation01 or whatever listed in .installationdata file. Now copy the .installer folder from desktop to %userprofile%\AppData\Local\Android\sdk\ndk-bundle and start the SDK manager and start the installation again for NDK. The SDK manager will start the installation skipping the download process.
In order to help those who are using MAC OSx, The process on MAC is as follows:
download ndk-bundle in zip format
run terminal
use below command to find your temp directory in mac (e.g. /var/folders/sp/31g4p3kd5l10c68qdy475krr0000gn/T/)
echo $TMPDIR
change directory to PackageOperation01
cd PackageOperation01
copy ndk-bundle.zip into the directory
cp /path/to/ndk-bundle.zip /$TMPDIR/PackageOperation01/
start Android Studio and in SDK-Manager try to install ndk-bundle again.
In Mac, With Android studio 3.3.2, SDK Manager keeps choosing new temporary folder to download the ndk-bundle. The following steps helped to install the downloaded ndk zip file.
Go to SDK manager, start downloading NDK.
Go to ~/Library/Android/sdk/ndk-bundle/.installer
cat .installData
path=/var/folders/vr/mz4hsqqs0wlgj9sfcpn3wfn5g2lwk3/T/PackageOperation07
PackageOperation0X is the temp folder chosen to download the zip file
Copy downloaded android-ndk-r21d-darwin-x86_64.zip to this temp folder (PackageOperation0X)
Copy ~/Library/Android/sdk/ndk-bundle folder to some other location
Cancel the NDK download in SDK Manager
cd ~/Library/Android/sdk/
You may find ndk-bundle folder missing as download has been cancelled in the SDK Manager.
Move the previously copied ndk-bundle to ~/Library/Android/sdk/
Go to SDK manager, start downloading NDK again. Existing file will be scanned and installation will be started skipping the download step.
I am learning to develop for Android devices.
However, when I download the example from:
http://developer.android.com/training/multiscreen/screensizes.html
There is no bin folder. I am developing from the command line (as opposed to through Eclipse), and
ant debug install
requires a bin folder.
What step am I missing to generate the bin?
First get the Android SDK and unzip it somewhere on your hard drive
Add SDK_ROOT to your system variables pointing to /tools folder under the sdk
Run the emulator
Copy the apk file to /tools folder
i followed above this procedure but i didn't get result ,
what can i do ?
Copying an apk to the tools folder accomplishes nothing, you need to install it on the real or emulated android device, using a command such as
adb install someappliction.apk
I need to email a coworker my android app as an .apk so that he can install & test it on his Samsung Galaxy Tab.
How can I do this?
You shouldn't distribute apk files that have not been signed. Here are the official instructions.
This can be done from the command line using something like:
$ cd project
$ android update project --path .
$ ant release
This requires:
The Android SDK installed and the tools sub-directory in the path.
Ant installed and in the path.
The result will be written into the bin sub-directory as 'project-release.apk'.
Follow this question's answers to obtain the .apk itself: How to build an APK file in Eclipse?. If you've built the project (i.e. with Eclipse) it exists in the project's bin directory.
If your friend needs a way to install the .apk, using the SDK tools then connect your phone via USB and run adb install appname.apk. Without SDK tools, your friend could use an app like Installer.