I have just installed Android Studio on my pc, but I am not able to find any activity or layout file on a creation of a new project.
Here is the screen shot
From the screen-shot it is clear that you haven't created any project yet. Go to file - Click on : New - Click on : New Project.
Now create a project which will get you all the necessary elements like activities, layouts, gradle, etc.
Happy coding.
Related
I'm using Visual Studio 2017 with the latest update.
I created a new Xamarin Forms solution (.net standard) and when I click on Resource.Designer.cs or when I try to "open with" with many options - I don't get any designer.
Since the text in the file says
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
Something must be missing.
How do I get the designer working?
According to an answer in the comments this is not like the Visual Studio designer file. It should not be edited, but also does not have a designer mode associated with it.
when i create a Android Application Projet and follow the steps, i check the box create activity as blank activity and when i finished i can't found the class in src, is this normal ?
Try This:
go to Help>(select)>Install New Software..>And paste this Url: https://dl-ssl.google.com/android/eclipse/And update the Developer Tools. It works for me
I am trying to add the Pinit button to my Android App. I have downloaded the SDK and copied the pinit-sdk-1.0.Jar into my Project/libs folder. I'm even able to make the necessary PinItButton import to my code. But for whatever reason, my XML isn't finding the Button widget, and so I tried to add it just using Java with this code:
LinearLayout ll = (LinearLayout)findViewById(R.id.pinterest_layout);
PinItButton pinit = new PinItButton(this);
ll.addView(pinit);
I know this is the correct way to add something using code because I tested it by adding a generic Button first. I run my project then, and it crashes on the line where I set up the PinItButton. This is the error that my logcat spat back at me:
07-22 01:19:52.160: E/AndroidRuntime(32367): java.lang.NoClassDefFoundError: com.pinterest.pinit.PinItButton
I believe that I'm understand what it is telling me, but what else should I be attempting then to create the PinIt button? Any help would be great. Thank you!
It was #Kai who helped me figure out my problem. I needed to check my libraries. I did that by going to project --> Properties --> Java Build Path --> Order and Export tab, then checking the library and clicking OK. My problem was then solved!
Im getting this error message. I created a new project and hit debug to test it. I added nothing and i get this pop up message. what could be my issue? I can create a new blank project wtih out the Controllers and Models projects in them it debugs just fine. But i need to use this solution provided to me.
New to mono droid any help will be apreciated.
You issue could be that none of the projects have been set to be deployed to a device.
Right click your Solution > Properties > Configuration Properties > Tick The Deploy checkbox for your Application Project if not already.
Also make sure to mark one of your activities with MainLauncher = true, otherwise Android does not know which Activity to start first. This is done in the [Activity()] attribute like so:
[Activity(Label = "Epic Activity", MainLauncher = true, Icon = "#drawable/icon")]
public class Activity1 : Activity {}
what could be my issue?
You are using Visual Studio... Android plays much nicer with Eclipse.
Kidding aside, every Android application requires an AndroidManifest.xml file. It looks like you are using MonoDroid, and there are docs about creating the manifest file.
Also, make sure you have built the project.
AndroidManifest.xml is generated as part of the build process, and the XML found within Properties\AndroidManifest.xml is merged with XML generated based on custom attributes.
I'm having trouble getting Eclipse to see that I've just put a new image into my project when referencing that image using R.drawable.this_text
So I drag my png into myProject/res/drawable-hdpi in Eclipse's Project Explorer. The name of the image is this_text and it's a png!
So I go into my application and I want to put this on the screen; So here's the code for that...
private void setTitle()
{
ImageView title = new ImageView(this); //this extends activity
title.setBackgroundResource(R.drawable.this_text);
...
}
This I have done before and each time I do it I experience the same thing:
if i just dragged my this_text.png into the Project Explorer in eclipse, the word "this_text" will be underlined in red, and not allow me to compile or proceed. I try to F5 (refresh) the project. I try refreshing the image foldr, the src, the actual java...etc! I try closing and opening eclipse but nothing really works. So I quit for afew minutes and work elsewhere in my application, and eventually this error goes away!
Well I'm impatient today-- And I'd rather know how to solve this incase I need to do any quick programming! So does anyone know what to do?
I'm using eclipse Version: Indigo Service Release 1.
Thanks- Ethan
R files for android are generated. Rather than refreshing you should be able to CLEAN the project which should fix your issue. You could even just delete the error from the problems list which would allow for compilation to start and for the generated R file to be created. Or you could make a change to an xml which would also allow for the file to be regened. As always make sure you are up to date on your tool chain.