android studio commit changes on Team services/tfs - android

I am using Team foundation services to upload android studio projects on TFS server
I the project is added successfully to server using
VSC -> Import into version control -> Import into Team services git
But when i tried to change any code in the activity and click VSC -> Commit changes a pop up message return no changes detected why??

Please try below items to narrow down the issue:
Try to run command $ git status (You need to install Git bash to run the command under the repo) to check if there are any error
messages there. If get the error like this : bad index file sha1 signature, fatal: index file corrupt. Just try to delete the index
file, then reset with below command (Reference this thread :How to resolve "Error: bad index – Fatal: index file corrupt" when using Git):
del .git\index
git reset
To run the command : Install Git bash >> go to the git repository and right-click the project folder >> Git bash here >> Run the command in Git bash.
Go to the file you have changed and Right Click >
Synchronize, then it will check against the last one manually. The commit again.
For Android studio with Git, you can reference Version Control System using Git on Android Studio.

I uninstall the Git and re install it again also i started from zero to upload the projects and commit works fine

Related

Git Bash not recognized android command

print_screen
Hi, I download android studio, and add enviroment variables to PATH (look print screen).
When i open CMD and use command ADROID is all OK, but when i use this command on Git Bash it doesn't work.
bash: android: command not found.
I use win7 home premium 64 bit system
What I should do? I installed Git-2.13.1-64-bit
Android.bat working on git bash, what i have to do to start working android (without bat). Can I config this somewhere?
in Android Studio Go to File > other Settings > Default setting> version control > git
and then define path to execute your git

git is unrecongised even I have installed it on my machine

In this tutorial they said:
To Clone volley you need to install Git GUI Client from (
http://git-scm.com/download ), I have installed Git GUI Client on my
windows machine After Installing Set the environment variable . After
Installing Git type the following below command line in your command
prompt.
git clone https://android.googlesource.com/platform/frameworks/volley
I have installed the gui git , and when I run the command I get git is unreconginised.
if I go to gui and and push to https://android.googlesource.com/platform/frameworks/volley they asked for username and password.
all I want is to clone volley and start using in my app. how to do that ?
Installing the git GUI vs installing git on the command line are different things.
When you download git, it should come with an application called git bash that looks like this
For Windows, you have to open this application which will come out with a terminal window of its own where you can perform git commands.
Keep in mind it has some basic things similar for navigation like in Linux (you can still use cd to navigate and wherever you do git clone, it will make the repo in that folder.
If you want to run git commands from command prompt, you need to check the option while installing i.e.
You can check if it's working on Command Prompt by typing git and you should see options come up.

'node' is not recognized as an internal or external command error with jenkins

I am trying to set up continuous code integration with the help of jenkins v1.592
I have an android hybrid code, which I'm, trying to build with jenkins.
I have set up environment variables for ANT_HOME, JAVA_HOME, ANDROID_HOME, and added then to the PATH respectively. I also have added nodejs and npm to the PATH.
ant version 1.9.2
java version 1.8.0_25
npm version 1.4.28
cordova android version 3.5.1
C:\Users\userName>path
gives
C:\Users\userName\AppData\Roaming\npm;C:\Program Files\nodejs;C:\whateverElse...
jenkins $WORKSPACE = C:\Program Files (x86)\Jenkins\jobs\myProject\workspace\
now I set my cmd prompt to jenkins workspace and execute the following commands
cd myProject
cordova build android
I get BUILD_SUCCESSFUL after 24 seconds
Similarly, when I go to my local jenkins server
The jenkins dashboard is shown and I have set up myProject there and
in the project configuration I have added the lines
"cd myProject
cordova build android"
in the build step and saved the configuration.
When I try to build I get the following error
Started from command line by anonymous
Building in workspace C:\Program Files (x86)\Jenkins\jobs\myProject\workspace
Updating repository at revision '2014-12-02T15:20:23.437 +0530'
At revision 263
no change for repository since the previous build
[workspace] $ cmd /c call C:\Windows\TEMP\hudson3297478415472069526.bat
C:\Program Files (x86)\Jenkins\jobs\myProject\workspace>cd myProject
C:\Program Files (x86)\Jenkins\jobs\myProject\workspace\myProject>cordova build android
'node' is not recognized as an internal or external command,
operable program or batch file.
Build step 'Execute Windows batch command' marked build as failure
Archiving artifacts
Finished: FAILURE
Any help would be appreciated
The same issue exists on mac OSX
Best Regards
Several things can be at play here
Did you add node to %PATH% through command line, or through the Windows UI? If done through UI, it can take affect immediatelly. If done through command line, it doesn't take affect until the next process spawns from shell, therefore Jenkins server restart is required.
Jenkins runs as "Local System" by default on Windows. You are listing C:\Users\userName as part of your paths, i.e. a user specific path. Did you set the %PATH% for all users, or just for your user userName? If it's not set for all users (or a specific user that Jenkins runs with), then Jenkins won't see it. You can change what user the service runs as.
2a. If Jenkins is running as "Local System" user, does that account have access to C:\Users\userName?
And lastly, if you set the %PATH% from command line, did you set it as a permanent entry using setx command?
In either case, from your job configuration, add a build step "Execute Windows Batch Command" and type just set (to display all environment variables) or #echo %PATH% (to see just the %PATH%) and verify that the environment is set correctly

Error running git"Cannot run program "git": error=2 [duplicate]

This question already has answers here:
Android Studio Checkout Github Error "CreateProcess=2" (Windows)
(9 answers)
Closed 7 years ago.
I have this error on my Android Studio running with Mac OS 10.8.3, I've installed the github client but is not necesary...
Any help?
Thanks
Within terminal you can find your git install directory with:
git --exec-path
Check the path registered in Settings -> Version Control -> Git, in text box next to "Path to Git Executable".
It should reference a local installation of git.
If the path mentioned there doesn't exist, that would explain the error message.
Use your terminal and check the following.
1) Check if you have installed git
git --version
You should see something like
git version 1.7.9.5
If not, there could be an error in Git installation
2) See if a .git file exists in the directory you want to push to the remote repo.
cd <into your directory>
ls -altr
You should see a file with the name .git.
This is the file that git will use to track the repo details.

Building liblinphone for Android

I am building Linphone application for android. I am using windows xp 32 bit.
1) Download android ndk
2) Installed the autotools: autoconf, automake, aclocal, libtoolize pkgconfig
3) run the ./prepare_sources.sh/
I got the output in terminal as
$ ./prepare_sources.sh /cygdrive/d/android/androidNdk/android-ndk-r8d
using /cygdrive/d/android/androidNdk/android-ndk-r8d as android NDK
./prepare_sources.sh: line 23: git: command not found
Applying patch to ffmpeg
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|--- submodules/externals/ffmpeg/libavcodec/arm/int_neon.S.orig 2011-09-30 19:43:21.935593025 +0200
|+++ submodules/externals/ffmpeg/libavcodec/arm/int_neon.S 2011-09-30 19:44:21.115168033 +0200
File to patch:
Any info, questions or anything really is highly appreciated
Part 1
The following steps can help you create and install the build on your device or emulator(Tested on Mac):
Step1: you need to have the Android SDK and NDK configured and istalled
Also install Autotools Mac users can use this link (Follow point 2.3 only in the link)
Other platform users please make sure you install it correctly.
Step2: Mac users open up your terminal and clone the git repo on any directory you want
to by running the following command: (Other users sorry i don't know how but i think you can figure it out that how you can get the git repo on your directory using command promt or whatever you are using)
$ git clone git://git.linphone.org/linphone-android.git --recursive
After you get the Repo copied into your directory now go to the directory and open the README file and read out the whole file.
Step3: Now we will follow as the instructions written in README file
First Go to root directory of the downloaded project using the following command on Terminal:
Mac users on terminal write cd and
then drag and drop the "linphone-android" folder on terminal
(when you drag and drop the folder terminal will get the path of the folder and then you can hit enter to get into the directory of that folder)
$ cd /Users/myname/Desktop/Android/linphone-android
or just use simple command cd to get into the folder
$ cd Desktop
$ cd Android
$ cd linphone-android
Now when you get into the directory on terminal then check your PATH of SDK & NDK installed on your Mac run
$ echo $PATH
if you see the path with SDK and NDK location then it's ok to proceed with Step4 and skip the below part and if not then you need to setup the PATH before you execute the make and make install script in Step 4:
To set up path use :
$ export PATH=/Users/myname/Documents/adt-bundle-mac-x86_64-20130729/sdk/platform-tools:/Users/myname/Documents/adt-bundle-mac-x86_64-20130729/sdk/tools:/Users/myname/Documents/android-ndk-r9:$PATH
it's like export PATH=(Path of your SDK platform tools folder):(Path of your SDK tools folder):(Path of your NDK folder):$PATH
This will set up the path and to confirm again run
$ echo $PATH
Now you will see that the path of SDK and NDK is there.
Step 4: Now if the Path is already setup you can simply run
$ make
Now connect your Device to you Mac/Pc and see if eclipse has detected it.
After the device is connected run:
$ make install
$ make generate-sdk (optional)
This will install the application into your phone. (you need to have an working SIP username and password to configure in the app)
This above steps worked for me and i was able to get the app running on my device.
Part 2
Importing into Eclipse :
After you have made your build then now you need to import it into eclipse.
Step1: Go to eclipse click on File Menu then Import then select
Existing Android Code into Workspace
Hit Next and Browse to the linphone-android project folder
And Only tick linphone-android folder and Leave Copy project into workspace untick.
Do this Like the below image:
And hit finish.
Now you right click on "linphone-android" (project name) and go to Properties and Java Build Path and then Order and Export and then reorder them as my image below and untick gcm.jar
Hit OK
And Boom No errors
Now just run it on device or emulator. (Make sure your minimum target SDK matches with your device or emulator.)
The above steps worked fine for me and it will work for you as well.
All the Best !!
According to README in root dir of linphone-android you don't need to run prepare_sources.sh, remaining steps for you is to run "make" and "make install":
LINPHONE for ANDROID
**************
To build liblinphone for Android, you must:
0) download the Android sdk with platform-tools and tools updated to latest revision (at least API 16 is needed), then add both 'tools' and 'platform-tools' folders in your path.
1) download the Android ndk (>=r8b) from google and add it to your path.
2) install the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
2bis) on some 64 bits systems you'll need the ia32-libs package
3) run the Makefile script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
$ make
4) To install the generated apk into a plugged device, run
$ make install
Existing answers shows how to build old linphone but to Build Latest Linphone for Android You can follow these Steps:
1) First Download Android SDK (at least API 16 is needed)
2) Then Download Android NDK(>=r9d) from Google.
3) Then Install cmake, python, yasm nasm Dependencies which is further required while installing Linphone. you can install these tool through Terminal.
4) Then You have to download source code of Linphone using following command:
git clone git://git.linphone.org/linphone-android.git --recursive
5) After Downloading Source code You have to set Path of Android SDK,NDK and also JDK
in Android SDK You have to give path upto Tools.
For Example : in console type following command
export SDK_PATH=/home/rajesh/android/adt_bundle/sdk
export NDK_PATH=/home/rajesh/android/android-ndk-r10c
export JDK_PATH=/usr/lib/jvm/java-7-openjdk-i386/
export PATH=$PATH:$NDK_PATH:$SDK_PATH/platform-tools:$SDK_PATH/tools:$JDK_PATH
6) After setting path you have to navigate through Linphone directory and type command “./prepare.py” then This will configure the build and generate a Makefile in the top level directory.
If you get following error: CMake Error Could not find the intltoolize program then
Refer
http://lists.nongnu.org/archive/html/linphone-users/2015-07/msg00092.html
7) After setting path you have to navigate through Linphone directory and type command “make” then it will generate apk for Linphone.
8) To generate a liblinphone SDK zip containing a full jar and native libraries, run
$ make liblinphone-android-sdk
I hope this helps.

Categories

Resources