I was trying to upload my project to GitHub on Android-Studio.
Pushing to GitHub master... process never ends and Version Control Console gives this Error:
GitHub --credentials get: github: command not found
'C:\Users\SA'EED~1\AppData\Local\Temp\git-askpass-2722525787662236837.bat" "Username'
is not recognized as an internal or external command, operable program or batch file.
I only find an empty repository on my GitHub.
Assuming that you have the latest version of GitHub, check your git path.
Settings->version Control -> Path to git-executable
It should be something like -> C:\Program Files (x86)\Git\cmd\git.exe
Note this may vary upon where you have installed GitHub.
Try
Test
It should be a success. Try to push your code again.
If this does not work try solution 2
Solution 2:
Simply make a copy of your project(copy and paste) in some other location. Delete the .git physically from the new copy. Import the new copy into android studio again. Go to version control System(VCS)->Import into Version Control->Share project on github or bitbucket(whichever you have set up). Then enter master password and new repository name. Then your setup is complete and push your code.
You might find the answer you're looking for in this post: http://jrxie.blogspot.de/2014/02/github-credentials-get-github-command.html
tl;dr: you want to add your equivalent of the following folder to your PATH.
C:\Users\YOUR_USER_NAME\AppData\Local\Apps\2.0\LNKHAB6L.QR1\LP7D7JB2.E6Z\gith..tion_317444273a93ac29_0003.0000_c74cce3a838f9354
The folders inside Apps\2.0 are probably named differently, but you shouldn't have any problems finding the right ones.
Related
I'm migrating my Android project from Eclipse to Android Studio. I use Subversion and am wondering how I can migrate my SVN to the new file structure used in Android Studio without losing my history.
Thanks for any help!
Posting this because it might help someone else.
I ran into the same problem as well. #user714965 was inspiring but didn't solve my problem because I couldn't figure out how to get SVN recognize that I moved a file from the original folder to the new structure in my working copy.
For the following, you will need TortoiseSVN or a similar SVN GUI client to do this.
Here is what I did:
Commit the Eclipse project last changes into the SVN repo.
Open Android Studio and use that to import the Eclipse project working copy.
Android Studio will nicely convert the Eclipse project into a Android Studio/Gradle project. Let's call this project "PrjGradle".
Open the converted Gradle project folder window and keep it one side of your screen
Go into your SVN repo where you have your project (using TortoiseSVN).
Backup your current trunk into a branch or a tag and call it "final_eclipse" or whatever.
Now, mirror the folder structure of the newly converted Gradle project on your local machine directly on the TortoiseSVN Repo Browser window. Meaning, look at how the directory is structured in "PrkGradle" and create/delete/rename folders directly on the trunk repository. This will be painstakingly tedious but you have to bear with it if you want to preserve your SVN history.
When you move files around (not copy) directly on the repo, the history of the files remain intact.
Once you complete, check out the restructured directory into your local machine. Let's call this "NewPrj".
Use a suitable Folder compare program (such as Beyond Compare) to synchronize missing items (such as build.gradle, .iml files, etc.)
Rename your converted project to "PrjGradle_old", and rename the newly checked out project (NewPrj) to "PrjGradle".
Open "PrjGradle" in Android Studio. That's it!
Hope it works out.
I don't know the differences of both file structures. But it would try it this way:
Check out your project (maybe better use a client like TortoiseSVN)
Build the new file structure (new folders)
Commit
Move the files from the old structure to the new
Commit (check the commit dialog if there are move actions only!)
Delete old folders which you don't need anymore
Commit
SVN will recognize these move operations. You will see if it works by the operations in the commit dialog. If there are "delete"/"new" actions something went wrong there should only be "move" actions.
I was working on an Android project in Eclipse and I then decided to Git it. Being new, instead of creating a local repository in the parent of the project, I ended up creating it in C:\Users\Little\.git\LocalRepository.
Now, I am facing a lot of problems in my Android project; specifically with adding user libraries to my build path.
Based on this answer here:
Eclipse will not recognize project as library (ActionBarSherlock/ViewPagerIndicator)
I have imported all the user libraries to my workspace. However, my project itself is in a different folder and hence I am stuck. There is also a comment on the answer which says:
Thanks. In my case, I forgot that my project was imported from git and
was physically located in another folder than all other projects.
I believe I have to do the same. How do I get the project from local repo to my workspace?
May be below command help someone to get rid of same issue with command line :
Step 1 : To make sure that ur git does not contains any local changes do :
git status
make sure here there is files where u have changes something and is in red color
Step 2: To check when and how commited last do :
git log
Step 3 :
rm -rf .git
Make sure u just take backup.
Step 4 : do git clone to dir u need :
git clone ssh://firstname.lastname#xx.x.xx.xx:xxxxx/project_name
This is not a question but is an answer to the issues I was stuck up while creating custom Android module for Titanium appcelerator.
I was able to run the ExampleProxy provided by the framework but was having problems creating my own Proxy class.
I was able to access the proxy. After lot of search I got the reference of following question -
http://developer.appcelerator.com/question/153993/how-to-create-a-proxy#answer-264746
Following response partially works-
"Thank you very much Benjamin Bahrenburg for the clarification. Also i
thank Mads for your quick response.
Exact answer i was looking for : Need to remove the files in the bin,
libs, and build folder. Then do a clean, in Eclipse. After all of that
it tends to build. Please make sure you are using Ti 3.1.0 ( not 3.1.1
which has an issue)."
In addition on windows 7 machine I had following observations-
The Module-generated folder in C:\Users\username\AppData\Local\Temp\ must be deleted.
In the module folder delete following contents - entire contents of bin and libs and delete everything in build except \build\generated\Application.mk
It cost my 1 day to solve this problem.
to successfully create and run a ViewProxy, you have to:
change its file/class name (from ExampleProxy) to ViewProxy
clean the dirty files, including: build/, dist/, and some "lib.so " files in libs/ folder.
execute ti clean in your "Titanium app" folder.
your ViewProxy is not the same as the module name. e.g. your module name is: "GaodeMapModule", your proxy name should not be: "GaodeMapProxy", it doesn't work.
How to generate custom javadoc for android 1.4 compatibility package?
The reference docs are available online (example), but is there some place where I can get a zip with javadoc available offline?
I suppose using the javadoc would be pretty simple, just a matter of setting the javadoc location for the compatibility jar.
You can generate your javadoc offline on your own from the source code. Just navigate to your android sdk directory then do the following
cd <path_to_android_sdk>/extras/android/compatibility/v4/
mkdir docs
For Windows:
javadoc -d docs -sourcepath src\java -subpackages android.support.v4
For Linux/Mac:
javadoc -d docs -sourcepath src/java -subpackages android.support.v4
This will generate your javadocs for you locally in the docs directory that you just created.
Then in your eclipse android project, go to your project properties where you added the your android-support-v4.jar, edit it's properties and add the the path to the javadocs you just created.
That should work!
ADT 17+ issues:
As some of you have pointed out. There have been issues getting Eclipse to see the attached javadoc for ADT 17+. This is a known issue and a bug has been filed. This is not related to the way you generate the javadoc (as I described above), rather this is an issue with ADT 17+ integrating with Eclipse. Someone has described a workaround and it can be followed here:
http://code.google.com/p/android/issues/detail?id=28801
Problem: If the android-support-v4.jar is in the /libs folder (as the ADT 17+ require) the javadoc is unavailable.
Edit: I have workarounded the problem by linking the offline version of the android javadoc to the android-support-v4.jar. As far as I know it is still not possible to link the online version (http://developer.android.com/reference). Steps:
Download the Documentation for Android SDK from the SDK Manager. You can find it under the latest Android version (4.1)
Link the javadoc folder to your project's folder, in Windows open a console and type: MKLINK /J {PROJECT_PATH}\android_docs {SDK_PATH}\docs\reference
Create the file libs/android-support-v4.jar.properties with this content:
src=android-support-v4.jar
doc=../android_docs
Close the project and reopen it. Clean if necessary.
The javadoc is linked. Check it by going to any Support library class, like android.support.v4.app.FragmentActivity
Thanks to this answer https://stackoverflow.com/a/11579339/933261
The answer by #wnafee is spot on, but if you are using Linux don't forget to use the forward slash character at this location like src/java.
IF YOU'RE ON WINDOWS and get stuck for ages like me, make sure you escape your backsmashes in the properties file, or things will silently fail. (who makes silent failing loaders anyway...)
This this is my properties file:
src=android-support-v4.jar
doc=doc\\android-support-v4_doc
and my dir looks like this:
android-support-v4.docs.zip
android-support-v4.jar
android-support-v4.jar.properties
doc
close project and open, and it all works for me.
I generated this one based on wnafee's answer:
https://dl.dropboxusercontent.com/u/31272696/android-support-v4.zip
I went through all of these solutions and none of them worked. Here is what I did to get it to work:
Navigate to the following folder:
D:\\Android-SDK\android-sdk-windows\extras\android\support\v4
Run the command:
javadoc -d docs -sourcepath src\java -subpackages android.support.v4
In your project's libs directory, create a file called android-support-v4.jar.properties
In the properties file, add the following lines (change the path to match yours):
doc=D:\Program Files\Android-SDK\android-sdk-windows\extras\android\support\v4\docs
src=D:\Program Files\Android-SDK\android-sdk-windows\extras\android\support\v4\src
In Eclipse, bring up the properties dialog for the Build, then navigate to Java Build Path and select the Libraries tab.
Expand the support library. In my case the path is:
D:\Program Files\Android-SDK\android-sdk-windows\extras\android\support\v4
Select Javadoc location. Click on the Edit button and then select the path to the docs. In my case it was:
file:/D:/Program Files/Android-SDK/android-sdk-windows/extras/android/support/v4/docs/
Close everything, including Eclipse and restart. You should now be able to browse docs in your code.
I've previously had success attaching the Android Source to Eclipse by following Finn Johnsen's instructions here.
However this approach seems to have stopped working:
samuel-josephs-computer-4:android-sources samueljoseph$ git checkout origin/froyo-release
Previous HEAD position was 1de4a2c... am 62619392: Merge "Fix leak when keylock is recreated."
HEAD is now at adba66b... This class no longer exists.
There was a more recent blog here which had some pre-organized source for Eclair, but nothing since.
There are also some StackOverflow posts from 2008 (older than both the above), e.g.
https://stackoverflow.com/questions/3182904/attaching-java-source-to-android-projects-in-eclipse.
What is the current guidance for accomplishing this?
There is a updated guide. So, you don't need to install an eclipse plugin for this.
Here is the link
Snip from above Link:
follow below steps if you already have downloaded Android sources
Head into eclipse, and press F3 over some android source you're missing, like Activity. And get this pesky window, which we all hate:
Click Attach Source, choose External Folder, and choose the core/java in the base folder.
There is an Eclipse plugin called Android Sources that installs the sources up through Gingerbread. I haven't tried it recently.
For Android 4+ here's a tutorial for attaching sources to eclipse.
EDIT:
First download the source and javadoc from sdk manager.
Goto Your_Project>>Android XXX, Right-Click on android.jar and select Properties.
Point the sources path as Java Source Attachment>>Location Path by clicking on External Folder
Point the reference path as Javadoc Location>>Javadoc Location Path by clicking on Browse
Now you can browse sources like this:
Here's a tutorial:
Make sure you have installed/downloaded the Android source for the appropriate Android SDK API version.
1.1 Check the API version you have specified in Eclipse for Android/Project Build target:
Open project Properties/Java Build Path and click the "Link Source..." button on the Source tab:
Point to where you have installed the Android SDK, expand the "sources" folder, select the appropriate source API version (and click "OK"):
Next...:
Important step is to exclude the whole linked source from building. Otherwise we could have some duplicate source errors plus who wants to build the whole Android source when we have jars already! So, click "Add...", type in *, click "OK" (and then "Finish"):
Verify everything is configured correctly:
Desired result -- linked platform source w/o side effects:
I hope this helped :)
The best way is as below.
Update Android SDK Manager, including source of the version you need.
click on Any class like activity, if source is properly attached, it will open the Activity class.
If it is not opening up, then click on the attach source and can give source path as above.
Source path will be like android-sdk-windows\sources\android-17
This will help you to add source for android SDK
You can do it this way .... hover or copy paste any class_name which is provided from android , just press F3 you will find a Attach_a_source tag there , click in it & here browse your android-sdk folder
and from it just pick source folder because inside it , every android files resides .