how could I import project from eclipse to android studio - android

as you can see, this error comes from AndroidManifest.xml, it occurs in android studio, I looked up a lot information, and don't know how it causes, I appreciate you if you could give me a hand.
the other thing I want to add, the activity showed illeagal in this file.

It got simpler in newer versions of android studio.
Just close your current project by File-> Close Project. After doing this the Screen shot shown/(similar to) below will appear.
Select the rounded circle highlighted option. Which says You can import projects from Eclipse ADT.
After that select your project from directory and wait untill the build finishes.

Related

Android Studio is confusing my projects with one another

I'm running Android Studio 3.1.1 on OSx and I have three projects that all use the same local library projects / modules.
My problem is that Android Studio often opens the wrong project when I open one of those 3 projects. Let's say I open Project 2 or Project 3, then I might find that Project 1 is the project that is actually opened, even though it displays the correct path for all three in the "Welcome to Android Studio" dialog.
The solution I've been resorting to until now is to
Remove all three projects from the "Welcome to Android Studio" dialog project list
Go into all three project folders, removing the .iml file
Importing the projects back into Android Studio using the "Import project" function
I'm getting really tired of this, and it's really confusing to think that you have opened one project but another one opens instead.
What could be causing this very strange behaviour?
Sometime android_studio is catching the old cache, to solve this go file , hit invalidate cache and restart. And the second solution is, you have to Refactor the package name, every project should have the unique package name in this situation. i hope this will help...
https://developers.google.com/android/guides/google-services-plugin
go to this official link. It solved me this problem. In my case, ] deleted saved file in this path "app/build/generated/res/google-services/{build_type}/values/values.xml" which contains my previous app's information. After that, when I run my current app, it created that file again, but with my current app's info.

How to refresh A Project in Eclipse

I have been studying Android on Eclipse Mars for some time and i have been facing a constant problem everyday-the changes made in a folder/file are not recognized by some other folder/file. For example, if i create a new layout in the layout folder and then use it in the setContentView, it shows me an error ("layout-name cannot be resolved or is not a field). It works if i save the project,close it, and open it again, but this takes up a lot of time if i have more than one error, so the question-is there a way to save and refresh the project (without having to close it) so that the newly made files and folders are recognized by the java files?
Thank you.
You can refresh your project in Eclipse by right clicking on the project root folder in your Project Explorer and selecting "Refresh".
You may also want to consider checking if you have "auto build project" turned on. In your top toolbar go to Project -> Build Automatically.
If build automatically is turned off you will have to manually build your project, by Right Clicking on the project in your Project Explorer and selecting "Build Project".
However, I do agree with Pankaj Nimgade that Android Studio is likely a better entry point IDE for Android development.
Real advice: Switch to Android Studio as soon as you can. There you would sometimes have another problem called "sync" though. But it's a much better IDE and you are at least in line with Google.
on Eclipse, F5 should do the trick. Or right click your project and Refresh. Or Clean all projects. If you are still stuck, simply close Eclipse and run it again.

Working the same Android Studio project from different workstations

How can I work an Android studio project from work and later at home without having configuration issues, shall I use something like dropbox ?
You will be delighted to know that there wont be any configuration issues at all.
Android Studio Projects ar portable.
You just have to Copy the project from office. Bring it at home. And import it in your Android Studio by clicking Import existing android studio project. 1st time it will show an error message, mentioning that the sdk directory didn't matched. But don't worry, clicking OK button will solve the issue it self.
Just make sure your sdk manager is up to date in both machine of home and office.

Adt eclipse phantom error

I was developing a simple app and eclipse says that i cannot run the app because there are errors. I try to find that error, but everything is perfect! Its a simple app(a counter)...
Please Help!
Print Screens:
[I cannot post images because of my low reputation(this is my third question)]
EDIT:
There is nothing wrong and it does not report any bug. When i click "RUN" it just says "Your project contain error(s), Please fix them before running your application".
Let's try to make a full clean of your project.
Right click your project name. Android Tools > Fix Project Properties. If you have multiple Library Projects linked to this project, follow the same step with them first.
Hit the top menu Project > Clean. Select the radio button Clean all projects and hit OK.
You should leave Eclipse doing its job (depending on the amount of projects and files, it may take a while). If this doesn't work, follow the same process, but as a third step, close Eclipse and restart it right after you hit the OK button. Eclipse is powerful, but a silly IDE sometimes.
If the problem is there after restarting, and you have some libraries attached, check inside the Project build paths (right click the project name, Project Properties > Java Build Path) have the proper JARs, only once, and before any Android Library

Android Eclipse Program Error

I just created a new Android project in Eclipse IDE, clicked on finish, and before even running project can see error symbol on project folder in eclipse IDE. If I expand folders, I don't see any red cross mark on any of files, can you please help me out. If I run as android project it says "Your project contains error(s), please fix them before using your application" . I am puzzled, it was a fresh project. Tried deleting and creating another project , restarting eclipse. Nothing works. Can you please help me out. Thank you for reading my post.
Lots of times Eclipse will fail to build Android projects properly. This might be eclipse.. it might be Eclipse's Android plugin. I'm not really sure. The way I get around it is by selecting from the menu Project > Clean... > Select the project giving you problems and hit ok. This will clear all built files and force it to rebuild, often fixing the problem.
There is a problem with the project itself, like the classpath or something. Go to Window > Show View > Problems (you may have to choose Other..., if so you will find it in the General section). In the Problems view it should give you more info. If you still can't figure it out post what the text from the Problem view.

Categories

Resources