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
Related
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
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.
By default Studio copy and installs from the directory /data/local/tmp on my device. And for some reason my custom ROM doesn't give enough permission to Studio to install from that location. So is it possible to copy and install the build apk from other location like sdcard? Or to give enough permission to Android Studio to install from /data/local/tmp
I've downloaded and installed the Genymotion emulator plugin via the plugin wizard in Android Studio. I'm running Android Studio on a Windows machine.
I'm getting a warning saying that I must provide a path to Genymotion folder:
Where is this folder located? I can not seem to find it in my Android Studio installation folder.
For windows, the default path is C:\Program Files\Genymobile\Genymotion
On a Mac, you will find it here: /Applications/Genymotion.app
You have to enter it inside the Android Studio settings, under Genymotion section.
make sure you have installed genymotion and virtual box then provide the link to genymotion location in windows by default is C:/program files/genymobile/genymotion
Not sure if anyone had the same problem but I received this same warning from Android Studio when clicking on the Genymotion Plugin warning me that
"You must specify a path to genymotion folder to use this feature"
The path was correct according to previous answers for a Mac but the problem was simply that the Genymotion plugin just needed to be updated. I went to Android Studio > Preferences > Plugins > Genymotion and selected update (This is on a mac) and the problem went away after I updated the plugin and restarted Android Studio. Hope this helps someone else with the same problem.
What to do:
Open Genymotion itself (the round & pink icon on your desktop).
Choose the "Settings" option from the upper menu.
Choose the option "ADB" from the upper menu.
Select "Use Android custon SDK tools". Put the following path inside "Android SDK": C:\Program Files\Genymobile\Genymotion
Why does it happen? you're getting the notice "You must specify a path to Genymotion folder to use this feature" because there's a bug in Genymotion working on Windows that misleads the Genymotion engine while trying to use the Android SDK.
Additional links:
Can't find Genymotion.app
On a Ubuntu, you will find it here: /home/user/opt/genymobile/genymotion
For Linux system :
though your genymotion is installed in "/usr/bin" folder its actually points to opt directory in root.
Use following path in android studio for genymotion :
/opt/genymotion
If you are getting this error after clicking installed plugin then, its asking the path of your installed Genymotion. So please provide path where your Genymotion is installed.
In my case it was C:\Program Files\Genymobile\Genymotion
In Linux, the way to solve the issue is the re-run the command
sudo ./genymotion-x.x.x-linux_x64.bin
in the directory where your bin file is located. For instance, suppose that I download the Genymotion .bin file to install Genymotion, and it's in the Downloads folder. I can move it to my home folder and run the following commands to install it.
chmod +x genymotion-x.x.x-linux_x64.bin
sudo ./genymotion-x.x.x-linux_x64.bin
After running those commands, you may run into an issue where the genymotion folder needed to specify the path does not get created. If you try pressing CTRL + h in the directory where your .bin is located, you will find a hidden folder called .Genymobile. The Genymotion folder will be inside of that folder. Even if you were to specify the path to that folder as /home/<user>/.Genymobile/Genymotion, you would still get the error. If you re-run the command sudo ./genymotion-x.x.x-linux_x64.bin where your .bin file is located, it will create the genymotion folder, and you can specify the path as /home/<user>/genymotion if the .bin file is located in your home directory. Once you specify the path, you can press ok, and it should work.
In case it helps, when I needed to add the Genymotion install dir to my $PATH environment variable on Mac OS X, I had to use the following path:
/Applications/Genymotion.app/Contents/MacOS
Simply write
C:\Program Files\Genymobile\Genymotion
It is the default path for the GennyMotion unless you have installed it somewhere else.
To install Genymotion plugin for Android Studio:
In Android Studio, go to File/Settings (for Windows and Linux) or to Android Studio/Preferences (for Mac OS X)
Select Plugins and click Browse Repositories.
Right-click on Genymotion and click Download and install. To see Genymotion plugin icon, display the toolbar by clicking View > Toolbar.
To use this plugin, Genymotion must be installed on your system.
Or download and install manually the plugin genymotion-idea-plugin.jar (not recommended)
You have to give installed path of genymotion.
More Details You can Visit Official Genymotion Website.
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.