Project files are not showing in android studio - android

I Just cloned android project from the bitbucket which doesnot contains gradle folder in it.
I imported it as an eclipse project in my android studio but problem is I cannot see any files when I select android from the top left corner drop down menu but some files are seen under project menu.
doesn't show any files.
shows some of files only.

check the settings.gradle and add this line and save include ':app'**

Related

why is the "app" folder missing from my android studio 3.5.3

I'm new to the android studio. I made a new project, with these options:
1- language= java
2- for phone or tablets
3- empty activity / no activity
but the folders in my project are completely different from everyone else.
.
why is this happening to my project? why I don't have Java, manifest, build.gradle (module:app) and ... folders in my project?
In project section may you left side android icon and
right side setting icon
do:-
click on setting icon ,hence you can see Compact middle package, select this.
your gradle is not build successfully.
rebuild project. see gradle problem, and fix it for solve project structure.
Happened to me recently. Files existed. Only visible under the Project...Project tab.
I prefer the Project... Android... tab
It was only showing the "Gradle Scripts" and missing the "app" folder.
App Missing in Android Tab of Android Studio
In Android Studio "Welcome" dialog, remove project from recent list
Close everything Explorer Navigate to folder
C:\Users\Andy\AndroidStudioProjects[project]\
Search *.iml
Delete these files (backup beforehand as always)
Open Android Studio as Administrator
Open Project with “Open” button and browse to file folder
Android tab… “app” should appear now.

Android Studio project cloned from Github only showing ReadMe

I'm trying to set up my Android project on my new laptop and I'm having some trouble. My project works fine on my PC, it's just the new setup I can't get working right. The project file is building properly, but it won't display in the project view. The files I can open show a red J in a circle. All attempts to update or pull just end in "All files up to date."
This is a link to my github profile: https://github.com/jschioppo/RecipeList
I have downloaded this project and found that there are no project level build.gradle and settings.gradle files.
This is not an Android project it's a module. I am able to run this Module at my end. Do following steps:-
Create new Android project in your studio.
Once it is loaded. Goto File Menu and Click on Import new Module.
If you already have a Module named app then changed the Module name and import this Module.
Now you will be able to run this Application.
You've not added project's build.gradle (located in project's root folder) to your github repo. Please add that to github and try importing again.

Android studio: this project is not gradle based project

I have one project which was initially in eclipse, then i managed somehow to convert it to gradle and everything was working fine in Android Studio.
But then i didn't work some time with the project and after few months when i returned to project i am surprised that Android Studio has problems with this project.
When i selected "Android" from top left dropdown in AS, where you should see the project as Android, i saw no files, then i did something and now i see there one empty folder Java.
If i hit button "sync project with gradle files" AS says message as posted in name of question, but it is gradle based project.. there are gradle files etc.
Do you someone know why is this problem? Why it should stop work like this?
Thank you
Make sure you open the project from its root directory. i.e. the directory which contains the top level build.gradle file.
The missing top level gradle file is what causes this error.
For native Flutter Projects:
Note that this error will also appear if you "sync your project with Gradle files " in the root directory. Gradle works only in your android directory (flutter_name/android).
Configure Gradle version
I got this error because i wanted to change some build values like the Gradle version and the Gradle plugin version (and other build values ex. kotlin):
In your current project: File>Open
Select directory: user/StudioProjects/flutter_name/android
Open directory in a new window
After it is opened it will load some packages (see right bottom), which will take some time.
Under File>Project Structure Project you can set the gradle version and under Modules variables of your build
Now you can sync your project with Gradle files or at least read out the error messages, that come with your configuration
After configuration, you might need to restart your project with File>Invalid Caches/Restart....
That worked for me:
copy the file build.gradle
drop the copied file build.gradle in
your app/project folder .
My project stopped showing all of sudden and already had build.gradle file.
I just reopened it via File > Open.

Android studio, how to delete folder with references?

i would like to delete one folder (unused library) from my project in Android Studio. But i cannot to do that by delete key on keyboard or any other way.
I tried to found delete under refactor->safe delete, but this option is disabled.
If i removed folder manually from folder, Android studio created a folder again and putted in one .iml file, so i cannot delete folder again.
Thanks for any help.
Remove it from settings.gradle
Build --> Clean (the blue rectangle should disappear)
Right click on module -->Delete
To remove a module, you first have to delete it from .idea/modules.xml.
Once you do that and save the file, you'll be able to delete the folder, which will no longer be marked with the module's blue rectangle.
Don't forget to remove the module from settings.gradle.
I found this aswer at delete project in android Studio 0.3.4
The problem is occurring because of workspace.xml and modules.xml inside .idea directory of your project.
You cant not delete any module if there is blue rectangle over it, Follow the steps to delete your module from project :
Go to File> Project Structure , select the module you want to delete and press the red minus sign button to remove.
Note : Also remove if any reference in build.gradle file of your main module.
Clean your project using Build > Clean Project
Close your Android Studio now
Go to the project directory and delete the your_project.iml file and content of .idea folder from project root directory, also delete the module directory which you want to remove.
Open Android Studio again and let it sync the project with gradle
If module appears again there will not be any blue rectangle mark on it so you can delete by right click > delete and clean your project.
Sync your project again with gradle, if it appears again check your event log if somewhere something from library is used, if it is remove them all.Check your File > Project Structure as well if there are any error referring to your module library on bottom. If it is using the red bulb button remove it.
After remove all things Clean Your project and sync again.
Let me know in comments if any problem occurs.

Android Studio "Project Structure" not coming properly

I follow all the necessary steps for Android Studio installation. I also checked this question, but still facing the same issue.
But whenever I create any new project, following screen come. I couldn't found any project structure as I can see in Eclipse.
Here, I can't find any "src","res" or any file structure. Any idea, how to get proper Project Structure?
when I tried to add "New Module" following error comes to submit.
No message
java.lang.IllegalStateException:
at com.android.tools.idea.wizard.NewModuleWizard.onFailure(NewModuleWizard.java:159)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:340)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$1.run(ExternalSystemUtil.java:364)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:304)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:185)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:226)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:175)
at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:695)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:458)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:154)
When I go to Edit Configuration, can't create any module due to above error.
Go to File > Project Structure > Project Settings > Modules.
Click on the green colored + and add new module.
select Application module and set the content root to your project module.
Click next and then finish.
This should do the trick and the complete project structure will appear.
It worked for me.
Change the SDK to a level that you have installed in the SDK manager. The SDK manager can be accessed from Tools -> Android -> SDK Manager. For me, Android Studio was packaged with API Level 17 but the new project wizard tried to target API Level 18.
When something like that happens to me, to fix it, I go to
File -> Project Structure -> Modules, click (+) to add a module.
To import the main module you have to search for the IML extension file to load the project structure configuration again (for example app.iml), and thats all. I hope it helps.
Kip2's solution worked for me with a slight variation:
1.) File -> Invalidate Cached/Restart..
once android studio restarts:
2.) File -> Sync Project with Gradle Files
Just doing "File -> Sync Project with Gradle Files" (or doing "File -> Sync with File System"), did not correct the problem. I had to invalid the cache first, and then sync the project with gradle files for the project to display properly.
Finally find solution.
Whenever Android Studio starts, it search for "Gradle" installation. If not found, it will download new version of it and cache it here.
C:\Documents and Settings\user\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok
Here 72srdo3a5eb3bic159kar72vok directory name may be different.
What you need to do is, download gradle-1.6-bin.zip, place it in above directory. Then decompress it there. But make sure your path should like below.
C:\Documents and Settings\crathod.SOLUSOFTINDIA\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok\gradle-1.6\bin
Now, when you restart your Android Studio, Gradle will be initialized and Project will opened in Full Project Structure.
Modules or the project structure could also not appear because you're in a branch where *.iml files are missing. This happened for me when I was migrating from Eclipse and had decided to check back into the original branch that had the Eclipse-like project structure. What solved my problem:
Checkout the branch with Android Studio-like project structure
File -> Invalidate Cache & Restart
Also, make sure that the root iml file matches case with your root folder. Incorrectly named iml file will cause such problems.
Just delete the root iml file (you can backup if you like), close the project and re-open it. Android Studio will generate the correct iml file and the project structure will be restored.
This is tested on Android Studio 2.1
Before:
  
After:
  
  I got the java folder (src folder) and others.
Solution:
  
File > Sync Project with Gradle Files
Android Studio Version: 3.2.1
Note: This case did not appear on the old version. For example, 1.5.1 (2016/03 before)
Keywords:
file explorer
file structure
file hierarchy
file system
folder & file list
project explorer
project structure
project hierarchy
disappear / gone / did not see
Android Studio bug / issue
simple way to restore
Delete the project hidden .idea file and .gradle file and restart your project this will fix your issue.
I deleted the app from the list of apps when you open Android Studio, then I reimported the project.
For Android Studio 2.2, you can simply click the left bottom and then select Project
In Android Studio 2.3.1, you don't have the Application module option if you wanted to add a module. The best solution is to right click your project and select "Jump to the source" from the menu. That solved my issue.

Categories

Resources