I would like to know how to create a customized directory structure template that will be created each time I start a new project. Rather than having to create files, and folders over and over, is there a way to just have the New Project Wizard create them by default in Eclipse? I know you can customize the content of files by modifying the template. I am interested in creating new folders and perhaps new customized files in those folders.
I don't know of any way to do this in Eclipse, but one thing that comes to mind is to create a sort of template project setup the way you want it and then just copy it. I don't know if you are working with plugin projects, if you copy a plugin project, make sure you fix the manifest to change the name of the plugin.
Related
I'm an iOS developer, and I'm expanding my skill set by working through the recommended Udacity tutorials for Android development.
In the "Add a Menu" tutorial in "Developing Android Apps", in order to create a new XML file for menus, it states:
"right click the res directory, select 'Android Resource Directory'". This is followed by a number of other points to correctly set up a menu xml file.
On my system, when I right click on the res directory, I have no option for "Android Resource Directory". I've uploaded a screen grab of what I get:
compared to the tutorial:
I've tried just creating a standard directory, and then right clicking and making a new xml file within it, but it doesn't seem to be working, as the XML file won't even open when I double click on it. I'm guessing it also won't be setup correctly, and I'm not sure how to do that manually.
I also tried the "Resource Bundle" option, but it didn't seem to give similar options as to what the tutorial says is to be expected.
I've had a look in the Udacity forums, and didn't see anything there on this. They also didn't seem to be frequented much, so I thought asking here was a better idea.
I'm also guessing Gradle sync error is not causing this, I haven't looked into the cause of that yet, I think perhaps because of my Core2 processor...
My guess is it's to do with my newer version of Android Studio, but I've been unable to find any info on this.
Thanks for any pointers :)
Seems like your gradle project files are not synced properly. As it is in screenshot you shared. You need to make sure gradle syncs successful so android studio will provide those context menu options properly for specific directory
Here - Resource directory
Click on Build->Clean Project and then file-> sync project with gradle file
Try the menu New/Folder/Font folder
currently, I am working on a android side project in my free time. As my project grows, I change the project structures so that I can maintain it easily. But whenever I add a sub-folders, the android studio automatically changes the structures as shown below.
If I go to the actual project folder, it is properly structured as "Fragments" folder contains "SignupFragments" sub-folder.
Does anyone know how to fix this?
The solution was un-checking "compact empty middle packages" in the directory setting options by clicking the gear button.
I am trying to use a different audio advice language for navigation, however when I set the SKAdvisorSettings to use a new language (en_us) it said it could not find the file. After some research I found this link saying I needed to add the sound files to the .zip file:
http://forum.skobbler.com/showthread.php/7250-Language-files-for-2-5-0-and-2-5-1
However when I unzip, add the file, and zip again (using Mac, right click, compress), the map fails to initialize and the only error shown is E/SKPrepareMapTextureThread: Shaders or Common files not found
Maybe I do not know how to add files to a .zip without otherwise affecting it, or I am missing how I am supposed to add the sound files to the project completely.
tl;dr: I want to be able to add more sound files to the navigation advice.
Thanks
After you have added the language files, you have to create a new zip by selecting all files inside the SKMaps folder, and renamed it from Archive.zip to SKMaps.zip and move it the assets folder replacing the old SKMaps.zip.
Xamarin has a RazorTodo sample that demonstrates how to build a hybrid app using WebView and razor. It contains a portable library that contains the views, models, and so forth. However, when adding a program for the portable library, I can't find a template for that. I can create a normal "portable" library, but it doesn't have a "Views" folder. I can create one, but then there's no template for adding .cshtml files. I can create a file of a different type with the .cshtml extension, but it would be nice for VS to know about the type. Am I missing something?
Thanks.
-John
Using a Views folder is just convention. It is perfectly legitimate to just add the folder.
If you are working inside of Xamarin Studio, you can add a .cshtml file to your project by choosing "Preprocessed Razor Template" under "Text Templating" in the "New file" dialog.
Visual Studio doesn't currently include this template type, but you can easily add a Text File or HTML File to your project, named with the .csthml file extension, and turn it into a preprocessed razor template by editing the properties on the file and setting "Custom Tool" to RazorTemplatePreprocessor.
I was looking for a way to add some such folder in my Android Project that do no get compiled up to my apk file.
Why I need it :-
We need to maintain proper documentation for project (that actually
everybody needs to ;) nothing new),
but I find it very irritating to look out for that documentation
folder again and again.
.
I am open for any way i can make dcocumentain folder easily one
click accessible (I am already doing it thru taskbar sortcut. ) But
I want it to get the ease of version control thru Eclipse likewise we
do it for our project
IDE :- Eclipse
I got a way myself :-
I had an idea that if I create a folder in my application project with
some anonymous name that actually android has not listed in its
directories ("I am talking about the default one like "res", "src",
"anim"......)
Then either it should "raise an error" or should "ignore" it while compiling to form apk file
luckily it ignores any such folder. now i can put all the documentation in my project.
NOTE:-
My answer empirically driven
I had tested it by creating a "Docs" folder and then copied 1 GB of
random data (includes almost all type of files we came across from
multimedia to zipped ones).
Then I build the apk and the size of the apk was in-effective of all
this..
but when i copied the same data to assets it was showing a huge change
in size of my apk file..
Consider using Javadoc in addition or, if possible, instead of any other documentation.