Android Studio- git Clone: "Unable to create destination directory" - android-studio

I am trying to clone a github repository from my account in my Android studio, but each time I try to clone it by
VCS -> get from version control -> URL, an error message pops up with message:
"Clone: Unable to create destination directory".
What can I do?

Go to your Android Studio installation directory (usually Program Files/Android/Android Studio).
Go to the bin folder.
Right click studio64.exe (or studio.exe if you're using the 32bit
version) and run it as an administrator.
Now clone should work just fine.
I'm sure there is a better solution out there but right now, this should work.

Check your folder path.
In my case, my directory name had whitespace, so I changed the folder name from namu nikam to namunikam.
After that, github cloned the project.
The project error message was:
Cmd doesn't allow us to run commands with any space in between
Sometimes we use underscores between words, like namu_nikam.

Related

How to Open my GIT REPO in VS CODE in Linux

I have installed the VS Code by following the VS CODE site.
Now I want to use it to open my git repository to edit files.
Installation is completed on Linux.
Clone your repo first to a local directory.
Open VSCode.
Select 'File-->Open Folder' and select the cloned folder.
The files will be shown in the side bar.

When trying to export libgdx desktop using command on android studio, the command is not recognized

So I went onto the internet to find out how to export my libgdx project from android studio, and I learned that you can generate it by using the command gradlew desktop:dist. But when I type this into the terminal window in android studio, it says, 'gradlew' is not recognized as an internal or external command, operable program or batch file. Why is this happening?
This is happening because the terminal can't find the gradlew program. If you're using Linux, make sure to type ./gradlew- but my guess is that you're using windows.
First, use your file browser to navigate to your project directory and make sure that gradlew.bat is present. If it isn't, you don't have gradlew as part of your project and need to go get it from The Gradle Website.
If you have gradlew.bat, make sure that your terminal is navigated to your project directory. On windows you can see where it is currently pointed using echo %cd% - if it doesn't show your current directory, you need to use the cd command to navigate to your project directory.
You can also confirm you're in the right place by running dir in the terminal- you should see gradlew.bat.

Why is Nuget trying to access my SVN files?

I'm trying to update the Nuget packages in a solution I have, but this is what it does for all of them when I try to update
Successfully installed 'knockoutjs 2.2.1'.
Updating 'knockoutjs' from version '2.2.0' to '2.2.1' in project 'MyProject'.
Directory 'Scripts\.svn\text-base' is not empty. Skipping...
Directory 'Scripts\.svn' is not empty. Skipping...
Successfully removed 'knockoutjs 2.2.0' from MyProject.
Successfully added 'knockoutjs 2.2.1' to MyProject.
Access to the path '(solution path)\packages\knockoutjs.2.2.0\Content\Scripts\.svn\text-base\knockout-2.2.0.debug.js.svn-base' is denied.
Access to the path '(solution path)\packages\knockoutjs.2.2.0\Content\Scripts\.svn\text-base\knockout-2.2.0.js.svn-base' is denied.
Access to the path '(solution path)\packages\knockoutjs.2.2.0\Content\Scripts\.svn\all-wcprops' is denied.
Access to the path '(solution path)\packages\knockoutjs.2.2.0\Content\Scripts\.svn\dir-prop-base' is denied.
...
It pretty much does that for every SVN file. Then says it wasn't properly uninstalled and I need to restart Visual Studio for the changes to take effect, but that doesn't solve anything. I have to manually clear out the files and remove the .deleteme file that gets created.
I also tried running Visual Studio 2012 as Administrator but that didn't change anything. I also have full permissions on my Windows 7 machine to the entire project.
I thought .svn folders were supposed to be ignored by Nuget? Is it trying to delete the older package folder? I'm fine with it taking out all the content files, as long as it leaves the .svn folder alone. I can always mark the files as deleted on the next commit.
Also, I know I can run Nuget without commiting the packages to source control, but I don't want to do that. The feature isn't enabled and the checkbox that lets Nuget download missing packages is not checked. So if it thinks that source control integration is disabled I don't know why.

How to run NDK samples?

Sorry to ask such a noob question, but the NDK documentation is wrong (r7b):
If you are developing in Eclipse with ADT, use the New Project Wizard
to create a new Android project for each sample, using the "Import
from Existing Source" option and importing the source from
<ndk>/apps/<app_name>/project/. Then, set up an AVD, if necessary, and
build/run the application in the emulator.
There is no "apps" folder, and the samples do not contain a "project" folder. So ... what is the correct way to run a sample?
Also, can I configure Eclipse to build the C++ portion of the code automatically?
Click File | New | Project...
Choose Android project, Next
Project Name: This is the project name shown in Package Explorer. It is just a string stored in the .project file that Eclipse creates. No file or folder is created with this name, and the output binaries do not seem to contain this name.
Click "Create project from existing source"
Location: choose the project's root folder, e.g. .../android-ndk-r7b/samples/bitmap-plasma
Click Next and choose your target API. Eclipse does not seem to allow this to be changed later, at least not from the GUI. I don't know why Eclipse does not simply get this information from <uses-sdk> in AndroidManifest.xml or from the "target" line in default.properties. I also don't know why the two may be different (e.g. in the bitmap-plasma sample, target=android-9 but <uses-sdk android:minSdkVersion="8"/>.)
Click next and consider changing the "Package Name" field which defaults to "your.package.namespace". However, the project will run fine if you do not change this field. Leave "Create Activity" and "Create a Test Project" unchecked.
Click Finish. Eclipse will create numerous extra files (e.g. .classpath, .project, project.properties) and folders (bin, gen, assets) alongside the existing code. That's in addition to the output folders created by ndk-build (obj and libs).
Eclipse won't build the native code by itself, but it will automatically deploy the native code (e.g. libplasma.so) if it is aware of it. After you build the native code on the command line, e.g.:
C:\...\android-ndk-r7b\samples\bitmap-plasma>..\..\ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi-v7a/gdbserver
Gdbsetup : libs/armeabi-v7a/gdb.setup
"Compile thumb : plasma <= plasma.c
SharedLibrary : libplasma.so
Install : libplasma.so => libs/armeabi/libplasma.so
"Compile thumb : plasma <= plasma.c
SharedLibrary : libplasma.so
Install : libplasma.so => libs/armeabi-v7a/libplasma.so
Right-click your project and choose "Refresh", otherwise Eclipse might fail to upload the native code when it starts the emulator.
Finally, to run the sample, right-click the project and choose Run As | Android application. See here about choosing which emulator is used.
See here about configuring Eclipse to build the native code automatically.
I am curious why NDK produces two *.so files with very different sizes for each ABI, e.g. it creates libs/armeabi-v7a/libplasma.so (15 KB) but also obj/local/armeabi-v7a/libplasma.so (63 KB). Anyone know the difference?
Instead of going the long winded way ( seasoned programmer love it - but for beginners). There is a way to build the native library in Eclipse and NDK.
1> First you need to make sure NDK path is correct in Windows -> Preference -> (tabs) Android -> NDK - If not set - point it to ndk directory.
2> Assuming you have you imported project as described above (New | Project | Create from existing code) - You right click the project and go to " Android Tools -> Add Native Support ..". If the path is set it will build the example. And then you can deploy it to the device or AVM by pressing the play button.
SOURCE
I'm working with Eclipse ADT and Android ndk 5b. My correct path to the project is android-ndk-5b/samples/project
When you import from existing source you have to choose a correct target, I use Android 2.3.3.
After, I've updated my project from command line, look this link, http://developer.android.com/sdk/ndk/overview.html
From the samples path write: android update project -p . -s and $Your_Path_Android_ndk/ndk-build
Finally, only run as android app in Eclipse and it's done
It seems that with Eclipse Juno, you can now
Click File | New | Project...
Under Android category select Android Project from Existing Code and click Next.
In Root Directory you can then browse and confirm your sample project location.
From here, Eclipse can automatically detect the jni and find the projects.
If this didn't work, go to terminal or command prompt and navigate to your project root directory (where you see jni folder). Then input
android update project -p . -t <your target level>
Here should be, e.g., android-9
After this, try again the initial steps.

Tortoise SVN: deleted folders reappear after being removed with the Repo Browser

Windows XP SP3; TortoiseSVN 1.6.16, Build 21511 - 32 Bit, which is the current version at the moment.
We're using Eclipse Helios for some Android development. When one of the projects was first checked in using TortoiseSVN, the bin and gen folders were included. I'm trying to delete them from SVN.
I went to the Repo Browser and deleted the bin and gen folders from the project. The Repo Browser log shows two "Deleted" entries for revision 40583. I then went to my working copy and did an SVN Update. It deleted the folders, as expected. The File Explorer shows a green icon for the project.
Next, I ran Eclipse and did Project/Clean. The bin and gen folders were created. The gen folder shows the purple question mark icon as an unversioned folder, as expected. The bin folder, however shows a red exclamation point icon, and it and all of its child folders all contain a .svn version control subfolder. If I exit Eclipse and do a TortoiseSVN Cleanup, the bin folder temporarily shows a green icon and then immediately switches back to the red exclamation point icon.
What's going on?
You should install a SVN client in eclipse, and don't use TortoiseSVN altogether on the same directory as eclipse is working on. This is the root cause of your problem, and it will come again and again.
So the proper use is:
Install a SVN client like subversive or subclipse inside eclipse.
Depending on the client you choose, checkout the project from your subversion repository using the menu entries of the client you have installed.
After having checked-out the project, check the properties of the root folder of the project. They should define that the bin folder (or target if you are using Maven) should be ignored.
If you have to add that property, ensure to commit it, so others will not have the same problem.

Resources