I just recently upgraded to the newest version of Android Studio (0.1.1), but I also used Android Studio to relocate my project to my Dropbox folder. So, I'm not exactly sure which one is causing this problem. When I build or try to run my project I get this error:
Cannot start compilation: the output path is not specified for modules
"actionbarsherlock",
"EmPubLite-EmPubLite".
Specify the output path in Configure Project.
I can't find any reference to "Configure Project" and the Project Structure option under File no longer works in this release.
Solution for Android Studio version < 1.0 :
You just have to go to your Modules settings > Project and specify a "Project compiler output"
and make your modules inherit from project. (For that go to Modules > Paths > Inherit project.
Or you can specify your output for each module if you want.
In order to do so you just need to follow this steps:
Open Project structure (F4 on one of the modules in the project explorer)
Click on Project tab on the left
Define "Project compiler output:" as YOUR_PROJECT_PATH\out (or any folder you want)
Click on Modules tab on the left
Go over all your modules and verify that under the Paths tab the Compiler output is set to "Inherit project compile output path"
I ended up re-importing the project using Gradle and it's back to normal. Very weird issue.
this is a problem that I face in case I open my phonegap project with Android Studio and Webstorm.
They are IntelliJ-based project and I guess they are both writing the files in .idea
Reimporting the project is the solution.
got same error while using studio feature to import from GitHub repository.
I deleted the whole project and .. cloned it using git terminal and imported as new project ... studio prompted to add VCS root, accepted ....everything was fine afterwards. As #lordhong prompted.
I found this:
http://www.chrisdew.com/blog/2013/07/17/android-studio-nosuchmethoderror-lazystringarraylist/
it is realy help for me.
Thus, in my case, the problem was to have two libraries:
protobuf-2.4.1.jar
and new protobuf-2.5.0.jar
it resulted error:
APK path is not specified for module “Example-Example”
To correct this, rename file protobuf-2.4.1.jar to protobuf-2.4.1.jar.disabled
mv protobuf-2.4.1.jar protobuf-2.4.1.jar.disabled
How I finally managed to fix after hours!
File -> Project Structure -> Facets -> choose module's facet -> Packaging. Enter in APK Path absolute path to apk to be created: C:\workspace\MyCompany\MyProject\myProject.apk
Press ok and run your project
Related
Previously I had a project, used Gradle as build system and Git as VCS and only added src/, res/, assets/ and manifest.xml to the repository. (As it is recommended I ignored all build files). Now I use android-studio-3.1.2 and tried to import that project:
Checkout project from Version Control → Git → clone
Then selected yes for Would you like to create an Android Studio project for the sources you have checked out to … ?
create project from existing source → select project name, location and type (.idea) → …
But I ended by this warning:
Migrate Project to Gradle?
This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system.
What causes this problem and how I can solve that?
Problem is caused by ignoring build.gradle files (in project and it's modules) and settings.gradle.
Also I did not find any way to solve that automatically by Android Studio. I have to create a project from scratch and move my files to that.
You dont need import project from scratch!
It is gradle problem which doesnot come from git
If you have latest android project,
You can copy paste "The Gradle" to project which have not gradle configuration!
It is more easy
When I try to run the application I get a message that I should choose the configuration.
When I do, I try to go with AndroidApplication, and then I get this message with an error saying module not specified. But when I try to choose a module from the dropdown, I get no options.
How can I fix this? Thank you!
I see two possible issues:
1) I don't see that you are using gradle(no gradle files shown in your 'project view', and I don't see the 'Gradle Scripts' drop down in the 'project view'.
This is an issue because it looks like this project is from Eclipse, not Android Studio. The inclusion of 'project.properties' hints at this too. Android Studio doesn't include the ant-based build system that can build a project from the Eclipse build system.
If this is the problem then close the project, and use the 'Import Project' wizard from the "Welcome to Android Studio" start window and re-import your proeject. This wizard will import the project for you and convert it to use the gradle build system.
2) If you ARE using gradle (and it just looks like you aren't)... Then this might be your problem...
In your 'settings.gradle' file (topmost level of your project...)
You should have something like
include ':<library-etc(obviously just placeholder)....>'
include ':app'
":app" here refers to the folder where your project lives. If it isn't in your 'settings.gradle' file then it won't be listed as a 'module' you can configure.
I've a big problem with Android Studio.
I have a project that depends on two other projects (as libs).
I followed the guide Problems importing project into Android Studio regarding ActionBarSherlock for import external modules.
I opened "Project Structure", imported the module, but after that I can't see it in the Modules area.
The Modules area contains only the root module, seems it is not refreshed (this is strange). So if I try to add the module as a Dependency, Android Studio doesn't find any module!
Then, if I try to re-import the module, it says that the module/project is already registered!!
Maybe I'm missing something, but I don't know what....! I have this problem both on Windows and MacOSX.
Thanks in advance,
Federico
Look around in your .idea directory for mentions of the problematic project. I had the same problem and resolved it by deleting the entry from .idea/sbt.xml.
In ij go to menu: View -> Tool Windows-> Gradle
Right click on the problematic module and click Refresh External Project, You should see the module in project explorer.
I had a similar problem with ABS and other library imports. The 'Project Structure' interface just wouldn't show the modules. On trying to import the modules, it would prompt, "The project is already registered". Seems to be an IntelliJ/Android Studio issue. Invalidate Caches option didn't help.
Reimporting the project after some cleanup did work for me.
As a precaution, take a backup of your project and store it safely
Ensure that your project builds via gradle command-line and you have all required dependencies specified in respective build.gradle files. Try building with: gradle clean && gradle build
Close the project in Android Studio (or close Android Studio)
Delete .iml files and .idea folders from all modules and the main project
Start Android Studio and reimport the project (Import project from external model > Gradle)
you should remove the project from respective gradle/sbt/maven/ant tab (used to be on right vertical line of Android Studio/Intellij IDEA)
See this answer: https://stackoverflow.com/a/30442195/907576
My issue was fixed when I restart IDEA.
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.
I am adding admob external jar in my project and i am using andengine as a library project but when i try to export the project i get this error. Also adding andengine library project adds andengine.jar also in android dependencies. Is that suppose to happen?
I have tried almost all other answers on stackoverflow but nothing seems to work.
If anyone can help me pls?
Following is my project image
Just solved this problem. I updated my sdk to latest and that solved the problem!
Try exit eclipse, backup if you want, delete gen and bin folders. Start eclipse again, build then export.
This usually happens to me after either eclipse has been running for a long time or after I have build a signed apk successfully. To fix it I just restart eclipse.
In Eclipse, select the project causing the error- go to the menu project -> properties -> java build path -> libraries and remove all jars including the android jars.
Then, right click the project, go to android tools -> fix project properties. Then, add back any other external jars you wanted to add to the build path following the same menu project -> properties -> java build path -> libraries. To ensure there are no errors due to missing libraries.
Then, do a 'clean' on menu project and build again. It should work.