Android Newsreader Example - No Bin Folder - android

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?

Related

Some Kivy Buildozer related stuff I'm not sure about

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

Android studio Where to install NDK file? (downloaded it in zip)

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.

encoding the contents of assets folder in android cordova app

We are developing a cross platform mobile application. Using apache cordova for this. Our android project structure is like given below,
Project
- src
- gen
- assets
- bin
- res
One of the issue we are facing is, once we build the apk file, anyone can unzip the apk and see the files (html, js, css) in assets folder. Can we encode, uglify, minify or obfuscate these files? We are not using any automated build tools. Building apk using eclipse & adt plugin.
Any help much appreciated

ADK 2012 and Android

Following the steps here to start developing android accessories with ADK 2012, there is this step:
Copy the < adk-source-download >/adk2012/board/library/ADK2 directory
and its contents into your sketchbook/libraries/ directory, so that
you create a sketchbook/libraries/ADK2 directory.
This is my very first time working with ADK 2012 so I'm not quiet sure what I'm supposed to do in this step, so maybe if someone could clarify it more for me?
Thank you.
The ADK2012 source must be downloaded and compiled using Git. This separate from the zip files you also download from the Google page. The zip file contains the Arudio IDE only.. If using windows you will need to pay special attention to the "note:"
From<Downloading the ADK Source>:
Download and install Git for your development system.
Download and setup the repo tool, as described on the Android open source project site.
Note: Developers using Windows must use a Linux compatibility package, such as cygwin, to install and run repo. Within your compatibility environment, you must install curl, git and python to be able to download and use the repo tool.
In a terminal window, create a new directory for the downloaded source files, initialize and synchronize a local repository:
$> mkdir android-accessories
$> cd android-accessories
$> repo init -u https://android.googlesource.com/accessories/manifest
$> repo sync
This is the hardest part.... If you make this this far you are on the path for success!
You should now have a folder called android-accessories with sub-folders /adk2012/board/library/ADK
Now you need to copy the ADK folder to your Arduio libraries folder
You need to find the location of your "sketchbook/libraries" folder. This folder was created when you installed the Arduino software. In Arduino click --> File --> Preferences. The first item should be "Sketchbook location". This folder will have sub-folder called "libraries.
Once you copy the ADK folder to library you can move to set 4 (restart Arduio) on the google help page

How can I package my Android app into an .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.

Categories

Resources