I update my os to win 8.1.Then i installed adt bundle.When i create a project on eclipse it creates project without any activity.I mean the src file is empty and also there is no xml file like main_activity.xml.Btw i can debug my old applications that i developed on win7.
Then i update my sdk.This time it creates activities but as an actionBarActivity.I mean MainActivity extedns ActionBarActivity.Also when the project created on folder appcompatv_7 is automatically created on my workspace.Then i code something it doesnt work on my phone but i know the code is totaly true.Help me please.
I removed the adt and reinstall it.
I check the updates.Eclipse didnt found any update.
My sdk manage looks like
You can always make your own activity by going into: src > com.example.projectName. Right click this, and create a new class. Make that class extend Activity.
If you want Eclipse to make your main_activity for you, then you probably did not "check" one of the checkboxes to make a new activity along with your new android application project. To do this, please do the following:
1. File > new > android project
2. A new window should appear. Name your android application as usual, and click next.
3. This step is important. You must check the "Create Activity" checkbox. You probably did not do this the first time, which was why
you had an empty android application project.
4. Click next until you see the "Create Activity" option. You can choose from either a blank activity, Fullscreen activity, or
Master/detail flow. Click the "blank activity" in order to get a
normal activity (and when I say normal activity, I mean the
MainActivity.java and the main_activity.xml)
Also, whenever you make a new activity in a pre-existing project, be sure to carefully read all the options. Right click your package in the src folder, press new > android activity, and carefully read all the options.
I hope this helps you.
Related
I am just starting to use Android Studio.
I have followed the steps through in the Studio. I chose "Basic Activity". The app loads, but there's nothing but empty directories there and it has no activity folder or anything to edit the layout with.
I checked it in the Windows explorer, and it just looks the same as in Android studio.
I've read this, this, this, this, this, this, and other ones, and have probably spent over an hour trying to figure out how to do this.
I've also re-tried creating the project at least 5 times, but I've had no success.
Edit: Here's what the app folder looks like:
Edit: Someone told me I should just create a new activity. Being an absolute new person, I didn't know how to do that, so I looked at this post. However, the post tells me that I need to go into the "New" menu, but I don't see "Activity" in here like the post asserted it would be.
In the following menu click the arrow and select "Project" (is better):
Then go to "name of your project folder" > "app" > "src" > "main" > "res".
I have no idea if this was what was causing it, but first I uninstalled then re-installed Android studio, deleted the old project, and created a new one.
It still didn't work, BUT I just noticed a little error log button.
You see, I named my application com.con.pfq. It wasn't liking the "con" part - said it's an invalid file name.
Sooo... I recreated the app as com.connoriscool.pfqmmobile. It liked that more.
No idea what's happening here, but that's the solution.
The screenshot of my starting eclipse page.
So I'm very new to eclipse. I'm 16 and need it for school, I've been using it for 2 months now.
One of my assignments was to use JFrame and create a GUI which I had to import into eclipse.
However, when I created the java project and then tried to use JFrame it would show me the source(I think that's what its called) but wouldn't let me open the design part.
So then I tried to create a class in a new java project and it wouldn't show me any code so I deleted eclipse and tried to install it again.
Which I did twice and now I just get this screen whenever I open it. I can't find the project explorer and I cant use it.
Please help me to fix and get the screen back to normal with the console and terminal and package explorer visible as well as how to use JFrame properly.
Click Window > Show View > Project Explorer as shown below:
Similarly, open other views like Console, Problems, Outline etc. (whatever you need).
I think it was a default title, but after finally finishing an App I just realised that the name of it is "Active App"
Now, I wanted to rename the App to "Bonus Calc".
I created a new Project called "Bonus Calc" and copied the code from the "Active App" xml files, java files etc, and replaced any code that said "activeapp" with "bonuscalc", including package names etc.
I clearly renamed everything since the code is compiling and running fine on my phone.
However the name of the app in my phone is still "Active App".
the name of the app is named in the android manifest. just change the name there and it will be done.
and as to your second problem that i saw - you went through alot just to rename your project. next time just right click on your project -> choose "refactor" -> and than "rename".
I start my first Eclipse Project but I cannot create any Activity, I already Restart my IDE and Even restarting my Computer does not help.
What I did when creating a Project:
File - > New Android Project - > Fill-up Information (min:API-8,Target and Build:Android 4.XL prev) next ---> next ---> Blank Activity ---> Fill-up Again -- > Finish
But no activity is in the SRC folder, I need to know whats wrong with my IDE or related to my problem.
I also done Updating using this CDN http://dl-ssl.google.com/android/eclipse/ but it wont work.
I got the same issue as you do and I have a working solution which is I already posted here
Eclipse doesn't create Main Activity and layout
Using this Eclipse Update http://dl-ssl.google.com/android/eclipse/ did not work for me. I notice this problem when I download the latest updated SDK
Luckily the solution to my problem is very easy.
By Selecting Empty Project instead of Blank Activity makes it working.
i have done one small coding in mainactivity.java and now i have to create another java in src folder in android eclipse but i am not able to do it
i want to create as shown below
so i want to create new class stackinfoactivity .
i click on the next after choosing android activity in the menu menu
i choose blank and hit next
details entered and click on next button
instead of creating a class i am getting an error i have added all the unique details is there any problem with my eclipse i need to correct my eclipse
i clicked on finish button the activity will not get created i have colored the image above
please anyone suggest me how to correct and get rid of this error
Check if you have older version of ADT plug-in.
You need to update ADT plug-in after updating SDK manager.
Not just select "Help->Check for Updates" but select "Help->Install New Software..." and select the ADT site to install newer version of ADT plug-in.
The recent version of ADT plug-in is 22.6.0.v201403010043-1049357
I had the same problem after I upgrade SDK manager and my ADT-plugin is 22.3 at that time. "Check for Updates" always tell me no update available.
You can do this also like following way.
Right click on your Package name that is com.redpot.stockquote folder of your project then select new then select class you will get window like following images. (Please follow link as i don't have enough reputation to post images here)
http://share.pho.to/4tXRY
Here in Name just enter your activity name like StockInfiActivity. And then select Finish and you will see your Activity in your src folder.