Definition
Phonegap = tool to make things such as HTML5/Javascript games into
phones. It is pretty cool because desktop versions should work in
phones without extensive redoing things for other platforms.
I can find the general instructions but everything about Eclipse and things like that. I cannot find a word about Ubuntu such as here unless a lot of google -spam with a massive amount of confusing threads about different platforms where people are more-or-less bullying one another like here with red-herrings such as google. I wish there was some nice make -files to do things but no, the README is instruction to read the more-or-less ambiguous Get-Started. So:
Problems
Where can I find step-by-step instructions on Ubuntu to set up Phonegap?
I hope some outlining over different platforms.
ADT Plugin is not getting installed in Eclipse. Why?
Android Eclipse ADT -problem
I can find here the instructions
but cannot move forward for some odd reason, no instructions or help
-text to proceed. You can see in the photo that it does not allow me to click OK although I am following the instructions. I wish I could do this on console!
Definitions
AVP = Android virtual phone (you do not need all phones to test your code, use emulator)
ADB = application to push application from command-line to the phone
ADT -plugin in Eclipse = adding some buttons to Eclipse for things such as to add AVPs
ADT = Android Development Tools (not sure what they are actually, perhaps emulation-related things containing things such as linux
kernels, APIs etc)
I am trying to provide instructions for console -power-users, hopefully helping to get things fast set-up instead of wasting time a lot with the cumbersome instructions.
1. set up the development environment such as the Android SDK here.
$ wget http://dl.google.com/android/android-sdk_r18-linux.tgz
$ tar -xvzf *.tgz
$ ...follow README or some tutorial there...
I. Now go back to the Android SDK site where you can find the ADT Plugin for Eclipse
here. The
unclikable button becomes clickable if you search now with the
search-bar for Android something. The ADT stands for Android
Development Tools so install everything you get there under something
tools or related.
II. Fix the #override -problem (shortly requires 1.6 compiler -compliance-level), more here.
III. Test your Android installation work by loading an Android Sample -file and then plugging in your phone (with USB -debugging enabled: Settings > Development > click) or use Android Virtual Phone (=AVP)
$ adb devices # Shows your physics devices such
# as phones with USB -debugging enabled.
$ adb install ~/workspace/yourChosenSampleDemo/bin/*.apk
# Your first Android -app emerges to your phone, have FuN!
2. Set up the Phonegap with the below:
Some general instructions apparently here.
iOS: you need Xcode so somewhat limited.
Perhaps useful, source -code
here and general download
here.
The instructions are extremely inaccesible with Eclipse's click-click-something, poor! After wasting time with Eclipse's symlinks, I swiched to the console:
$ tree|less
$ search for the files needed, mark them done or use find -command directly ^C
$ copy the files to some dir such as ~/Android/Public so easier to do ^C
$ things at once ^C
$ pwd
/home/xyz/workspace/HelloCordova/res
$ cp ~/Android/phonegap-phonegap-475bfd2/lib/android/xml/* .
$ cp ~/Android/Public/cordova-1.7.0.js assets/www/
$ cp ~/Android/Public/cordova-1.7.0.jar libs/
Related
Is it possible to use Android Studio and configure Windows Subsystem for Linux as a Terminal? I really don't like to work with Windows cmd.exe, but when I try to switch to bash.exe, which seems to work, it cannot build the project because there are missing e.g. Android/sdk/build-tools/27.0.3/aidl'.
This file is there, but it is with .exe suffix as it was downloaded for Windows. Any workaround to use *unix like bash for Terminal in Android Studio while being on Windows 10?
Yes, it is possible. I'm doing it right now. I have an Ubuntu app as WSL and figured out that it's accessible at C:\Windows\System32\bash.exe
So, open Android Studio and navigate to File -> Settings -> Tools -> Terminal. There fill Shell paht with C:\Windows\System32\bash.exe and voilĂ !
Now, when you open a new terminal it will use the WSL you have installed in your machine.
I'm using Android Studio 4.0.1.
I'm setting this up right now and hit your question from Google looking for advice. So with that caveat, let me explain what I did to get it running and if you have follow up questions we may need to experiment together to find the answers.
First, I installed VcXserv: https://sourceforge.net/projects/vcxsrv/. This X Server for windows allows you to run graphical linux applications in WSL. You'll just need to export the display variable in your ~/.bashrc since that isn't done normally in WSL:
$ echo "export DISPLAY=:0" >> ~/.bashrc
Then you have to run XLaunch from the start menu. It takes you through the config dialogs (just choose the defaults) and it puts an icon in the notification area you can check to make sure it's running.
Then, you want to download the Linux version of Android Studio 3.1. Extract it into the WSL filesystem somewhere (I used ~/apps). Then from your bash shell you can run android-studio/bin/studio.sh and the window will appear and begin the unboxing dialogs.
This is as far as I've gotten, right now it's downloading the SDK. I still am not sure how adb over usb is going to work or tested the emulator. I'll update this if I learn more.
Update unfortunately, VcXserv is crashing when the main Android Studio window launches. I'm going to file a bug report on it and try some other X servers if I have time later.
I have the Android Developer Tool which shows eclipse version 4.2 (juno).
According to Eclim site required version of Eclim is as
Eclipse 4.3.x (Kepler) (Eclim 2.2.x), Eclipse 3.7.x (Indigo) (Eclim 1.7.x), or Eclipse 3.8 (Eclim 1.7.13 or greater)
I thought eclim 1.7.18 will work with eclipse 4.2. I also tried 2.3 but none are compatible with eclipse 4.2 which comes bundled in ADT.
So which version of Eclim should I use?
I got ADT bundle with eclipse 4.2 and installed eclim 2.2.6 which doesn't complain about eclipse's version.
I hope it works for you too.
For other readers not satisfied I'll tell my story, before you read you must know I'm that type of developers who love using the CLI and thinks that keyboard shurtcuts are faster than using a mouse, if you don't agree may be this setup is not for you:
Install main tools
I've downloaded Eclipse Luna (4.4.0) from the eclipse project website.
Download the Android SDK.
Later install the ADT Plugin (through Help > Install New Software).
After installing the ADT Plugin will ask for the path to the Android SDK.
Later on installed Eclim (2.4.0), it will ask for the eclipse installation folder as well for the .vim folder.
Start the Eclim daemon service. (In debian you can use update-rc.d to make it always run, or search a solution for your system, you can setup to start at system start, let the ideas come out!)
Setting up the Android Development Vim Studio
Check Eclim is up by typing in vim :PingEclim you should see the version of Eclim as well of Eclipse.
I suggest installing the NeoComplCache Vim plugin it integrates nicely with Eclim autocomplete, in the Eclim doc web site it says what you need to add to integrate it.
Eclim will detect the android-sdk path based on the setup you made on eclipse but if not you can define the android-sdk path (see Eclim docs).
How to create projects and install on device
With my NERDTreee I automagically CD in the selected root dir and use :ProjectCreate %/MyProjectFolder -n android, it will ask for some configs.
Later in order to you can build and install the app to your phone you need first to generate the build files (eclipse doesn't share these build files), use :!android project update --path %/MyProjectFolder (note you can omit '/MyProjectFolder' if you're already inside that folder). You can add --target and --name flags if you want to update these values.
At this point you can work in your project without any issues, code completion works excellent, if you need import something use :JavaImport but you know you can map it.
Wenever you want to test the app in your device (I use a physical device) use :Ant debug install and if build succeeds use :!adb shell am start -n your.package.name/.YourMainActivity this will fire the app in your device just like eclipse does.
You can combine the build and install command with :!ant debug install && adb shell am start -n your.package.name/.YourMainActivity. Also remember to keep a terminal open for your logcat adb logcat or if you declare a tag (I suggest doing it) adb logcat -s "MyTag"
Why to use eclim?
I was in a pain after updating my eclipse juno only errors was shown, I was tired of downloading, installing, updating eclipse, even the bundled ADT was bugy, Android Studio looks very ugly on linux by the swing font rendering, many hours were wasted at the end I just search for integrate my vim (I use it for web dev) and never looked back, used Eclim because I had the buggied eclipse on my system (is still here can't use that slow bugy crap, I HATE ECLIPSE).
Does it worth it?
If you don't have eclipse I suggest you try another Android Development Vim Studio without eclim, but if you already have Eclipse, go for eclim. And yes I'm happier to code this way in Vim rather than in eclipse, the only miss is the GUI Layout Designer. As some people say If you want something done well, better do it your self
Looks like a lot of work
Yes, for sure I'll start building a vimscript for this.
I have made an application over pyside and qml for pc and I am interested to know how I can run this on android tablet.
P.S.: My Program uses socket, threading and mongodb too.
I think its too big an answer and redundant as such. Will just point directly to the link :
http://qt-project.org/wiki/PySide_for_Android_guide
Also google for 'Necessitas' for further information.
Take a look :
https://github.com/raaron/pydroid
PyDroid is easier than pySide guide. But you should install it on ubuntu, or ubuntu with virtualBox. But first you should install Necessitas, Ant before setup PyDroid. If it is able to run Necessitas projec app on your device, then you can install PyDroid. Because PyDroid depends on Necessitas SDK. After installation of PyDroid, you open file manager as root, "show hidden files", go to /root/.pydroid location and open deploy.config, edit "adb-path"(type terminal "whereis adb" to find location) and necessitas location. after that it is easy to deploy android app with PyDroid.
So on my previous laptop I've installed the android-sdk-linux and Eclipse separately without the adt-bundle, without any issues whatsoever. Also, I installed it under my home directory.
Now that I have a new laptop (clean slate) to start with, I wanted to try and install the adt-bundle into the correct/conventional directory (which I understand is /usr/local/).
But after extracting the bundle into /usr/local/ I get weird issues like adb not being an executable, etc. Opening Eclipse yields a lot of errors regarding the SDK, ADT, and adb.
What is the correct method of doing this? A step-by-step or otherwise comprehensive set of methods would be greatly appreciated.
Also, is there any reason why I should consider installing android-sdk-linux and Eclipse separately instead of using the adt-bundle?
Thanks in advance :). This will help me learn more about Linux filesystems and administrations a little bit too!
It seems that the problem is in Linux filesystem permissions of your folder. In case of home directory the owner of the files is your user, in case of /usr/local/ the owner is root. You should try to change the owner of the folder:
chown -R <owner_name>:<owner_group> <your_dir>
As for reasons to install sdk and Eclipse separately, I don't think that you'll find critical one. Using bundle it's easier to install everything to work with Android (I think that Eclipse in this case is already configured, however I do not know precisely because I've never used this approach).
I've tried every possible way I can think of and followed every forum list I can find, still to no avail. I'm trying to get the Android SDK to be recognized by TitaniumStudio. I installed in by going through the folders and running it that way, I've tried the command line option, I've installed it through Eclipse (which it works in) but TitaniumStudio STILL will not recognize it. I've reinstalled TitaniumStudio, that didn't work.
Key Points:
Everything is up to date
I'm working on Mac OSX 10.6.8
I know of Terminal and what it can do, but don't know Unix commands
The above is probably significant because somewhere in a forum someone mentioned changing the PATH for the sdk to read the /tools and /platform-tools folders using the /.bash_profile (I think that's what it's called, correct me if I'm wrong there) but when I tried to run the command via terminal to create an AVD (android create avd -n android_sdk -t 2 (android_sdk being the AVD name and 2 to point to the android-4 platform)), i get the following error:
-bash: android: command not found
Please help me with some insight into this "-bash" and what that is and how to fix this annoying problem! >.<
EDIT: I've gotten it to a point where I now get the following error when I try to send (android create avd -n android_sdk -t 2) through terminal:
Valid ABIs: no ABIs.
Error: This platform has more than one ABI. Please specify one using --abi.
What the heck does that mean and what's an ABI?? o.O
Run tools/android, It'll fire up a "Android SDK Manager" where you would see various platforms listed and the ABI's for those platforms underneath them. For example when I fire up my "Android SDK Manager", I see Android 4.0 (API 14) and then underneath it is "ARM EABI v7a System Image". Check this package and install it. Confirm that ABI's are indeed listed by running the command "android list targets".
Remember to start a new terminal when you are making changes to .bash_profile or .bashrc files. Failing to do so, would lead to errors like you are experiencing because the changes isn't loaded in, and the new PATHs and all the programs there isn't available to you.
With that being said, you need to add the folder with binary programs to your path, you can verify that the path is loaded in with the following command:
echo $PATH
Which gives me this on Snow Leopard:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Setting a path can be difficult in OSX because it seems like they have changed this behavior quite a bit between releases.
Look here for a more detailed answer about setting path variables: https://superuser.com/questions/69130/where-does-path-get-set-in-os-x-10-6-snow-leopard
There is also a description here on how to get Snow Leopard to read the user supplied .bashrc in the home-dir: http://kaspergrubbe.dk/2011/enable-bashrc-on-osx-snow-leopard-and-lion/