简体   繁体   中英

“A path must be specified!” error during multi-module Android project import in Android Studio 0.3.1

I am trying to migrate an Android project to use Gradle. I was using Eclipse to develop it. I exported the project like Google instructed, and when i try to import it, i get the following:

A path must be specified!
Consult IDE log for more details (Help | Show Log)

The closes thing i found to this problem is:

Android Gradle export failed

However, it seems as though we have different things that went wrong. Playing around, i have also gotten this error as well and have tried everything suggested in this post:

Android Studio - migrating projects from eclipse

One of the comments in the above mentioned post mentions that it's a known issue, but it was back in June and since then a new version of Android Studio came out. I think this might be a separate issue.

I have tried changing dependencies in the gradle.build files to "...5.+" and "...6.+" per other suggestions and it doesnt work either.

I also have manually installed latest version of Gradle, unpacked it and pointed AS to use it. Same result.

Does anyone else have this problem? I am able to open my app in Android Studio and run it without using Gradle, in case this helps.

Here is a part of log:

2013-10-24 11:00:42,746 [   3519]   INFO - ij.components.ComponentManager - com.intellij.openapi.components.impl.ServiceManagerImpl initialized in 22 ms 
2013-10-24 11:00:42,764 [   3537]   INFO - ij.components.ComponentManager - com.intellij.openapi.project.impl.ProjectReloadStateImpl initialized in 15 ms 
2013-10-24 11:00:42,789 [   3562]   INFO - ij.components.ComponentManager - com.intellij.psi.impl.PsiManagerImpl initialized in 18 ms 
2013-10-24 11:00:42,793 [   3566]   INFO - ij.components.ComponentManager - com.intellij.openapi.fileEditor.impl.PsiAwareFileEditorManagerImpl initialized in 22 ms 
2013-10-24 11:00:42,794 [   3567]   INFO - ij.components.ComponentManager - com.intellij.ui.EditorNotifications initialized in 23 ms 
2013-10-24 11:00:43,053 [   3826]   INFO - ij.components.ComponentManager - com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl initialized in 239 ms 
2013-10-24 11:00:43,070 [   3843]   INFO - ij.components.ComponentManager - com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl initialized in 12 ms 
2013-10-24 11:00:43,112 [   3885]   INFO - ij.components.ComponentManager - com.intellij.openapi.vcs.changes.ChangesViewManager initialized in 35 ms 
2013-10-24 11:00:43,130 [   3903]   INFO - ij.components.ComponentManager - com.intellij.openapi.vcs.changes.ChangeListManagerImpl initialized in 60 ms 
2013-10-24 11:00:43,131 [   3904]   INFO - ij.components.ComponentManager - com.intellij.openapi.vcs.changes.VcsDirtyScopeManagerImpl initialized in 61 ms 
2013-10-24 11:00:43,139 [   3912]   INFO - ij.components.ComponentManager - com.intellij.codeInsight.daemon.impl.DaemonListeners initialized in 85 ms 
2013-10-24 11:00:43,216 [   3989]   INFO -                  TestNG Runner - Create TestNG Template Configuration 
2013-10-24 11:00:43,221 [   3994]   INFO -                  TestNG Runner - Create TestNG Template Configuration 
2013-10-24 11:00:43,227 [   4000]   INFO - ij.components.ComponentManager - com.intellij.execution.impl.RunManagerImpl initialized in 51 ms 
2013-10-24 11:00:43,278 [   4051]   INFO - ij.components.ComponentManager - com.intellij.xdebugger.impl.XDebuggerManagerImpl initialized in 27 ms 
2013-10-24 11:00:43,301 [   4074]   INFO - ij.components.ComponentManager - com.intellij.debugger.impl.DebuggerManagerImpl initialized in 14 ms 
2013-10-24 11:00:43,302 [   4075]   INFO - ij.components.ComponentManager - com.intellij.debugger.ui.DebuggerPanelsManager initialized in 17 ms 
2013-10-24 11:00:43,357 [   4130]   INFO - ij.components.ComponentManager - com.intellij.psi.impl.JavaPsiFacadeImpl initialized in 53 ms 
2013-10-24 11:00:43,366 [   4139]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/dynamic.xml file is null 
2013-10-24 11:00:43,402 [   4175]   INFO - ij.components.ComponentManager - org.jetbrains.idea.maven.tasks.MavenTasksManager initialized in 27 ms 
2013-10-24 11:00:43,405 [   4178]   INFO - ij.components.ComponentManager - org.jetbrains.idea.maven.navigator.MavenProjectsNavigator initialized in 29 ms 
2013-10-24 11:00:43,449 [   4222]   INFO - ij.components.ComponentManager - com.intellij.designer.DesignerToolWindowManager initialized in 41 ms 
2013-10-24 11:00:43,463 [   4236]   INFO - ij.components.ComponentManager - com.intellij.designer.palette.PaletteToolWindowManager initialized in 13 ms 
2013-10-24 11:00:43,498 [   4271]   INFO - ij.components.ComponentManager - git4idea.repo.GitRepositoryManager initialized in 34 ms 
2013-10-24 11:00:43,518 [   4291]   INFO - ij.components.ComponentManager - org.zmlx.hg4idea.HgRepositoryWatcher initialized in 11 ms 
2013-10-24 11:00:43,521 [   4294]   INFO - ellij.project.impl.ProjectImpl - 138 project components initialized in 965 ms 
2013-10-24 11:00:43,524 [   4297]   INFO - napi.vfs.newvfs.RefreshSession - [CR-IC-2706] [file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/<APPNAME>.iml] 
2013-10-24 11:00:43,604 [   4377]   INFO - ij.components.ComponentManager - com.intellij.openapi.roots.impl.ModuleRootManagerComponent initialized in 65 ms 
2013-10-24 11:00:43,622 [   4395]   INFO - ij.components.ComponentManager - com.intellij.facet.FacetManagerImpl initialized in 18 ms 
2013-10-24 11:00:43,623 [   4396]   INFO - napi.vfs.newvfs.RefreshSession - [CR-IC-2706] [file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>Project.iml] 
2013-10-24 11:00:43,643 [   4416]   INFO - le.impl.ModuleManagerComponent - 2 module(s) loaded in 121 ms 
2013-10-24 11:00:43,914 [   4687]   INFO - CompilerWorkspaceConfiguration - Available processors: 8 
2013-10-24 11:00:43,976 [   4749]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:\Program Files\Java\jdk1.7.0_21 
2013-10-24 11:00:43,980 [   4753]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:\Program Files\Java\jdk1.7.0_21 
2013-10-24 11:00:44,016 [   4789]   INFO - dle.util.AndroidGradleSettings - Found Android SDK home at 'C:/Mobile/Android/sdk' (from local.properties file) 
2013-10-24 11:00:44,733 [   5506]   INFO - .roots.impl.DirectoryIndexImpl - Directory index initialized in 762 ms, indexed 3438 directories 
2013-10-24 11:00:44,744 [   5517]   INFO - pl.PushedFilePropertiesUpdater - File properties pushed in 8 ms 
2013-10-24 11:00:44,820 [   5593]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/plainTextFiles.xml file is null 
2013-10-24 11:00:44,860 [   5633]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gant_config.xml file is null 
2013-10-24 11:00:44,965 [   5738]   INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342 
2013-10-24 11:00:46,950 [   7723]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 2132 ms 
2013-10-24 11:00:46,950 [   7723]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update 
2013-10-24 11:00:46,951 [   7724]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 1 ms 
2013-10-24 11:00:47,752 [   8525]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 5248 ms 
2013-10-24 11:00:48,746 [   9519]   INFO - attrs.AttributeDefinitionsImpl - Found tag with unknown parent: AndroidManifest.AndroidManifestCompatibleScreens 
2013-10-24 11:00:51,885 [  12658]   INFO - .manage.ContentRootDataService - Importing content root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' for module '<APPNAME>' 
2013-10-24 11:00:51,885 [  12658]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/debug/rs' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,885 [  12658]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/debug/java' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,886 [  12659]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/debug/jni' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,886 [  12659]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/main/aidl' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,886 [  12659]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/debug/aidl' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,886 [  12659]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/main/jni' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,886 [  12659]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/debug/assets' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,887 [  12660]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/main/rs' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,887 [  12660]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/main/resources' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,887 [  12660]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/debug/resources' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,887 [  12660]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/main/assets' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,888 [  12661]   INFO - .manage.ContentRootDataService - Importing source root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/debug/res' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,888 [  12661]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/instrumentTest/assets' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,888 [  12661]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/source/buildConfig/test' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,888 [  12661]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/instrumentTest/rs' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,888 [  12661]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/instrumentTest/aidl' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,888 [  12661]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/source/aidl/test' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,888 [  12661]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/source/r/test' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,889 [  12662]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/instrumentTest/jni' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,889 [  12662]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/res/rs/test' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,889 [  12662]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/instrumentTest/java' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,889 [  12662]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/instrumentTest/res' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,889 [  12662]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/src/instrumentTest/resources' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,889 [  12662]   INFO - .manage.ContentRootDataService - Importing test root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/source/rs/test' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,889 [  12662]   INFO - .manage.ContentRootDataService - Importing excluded root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/tmp' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,890 [  12663]   INFO - .manage.ContentRootDataService - Importing excluded root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/bundles' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,890 [  12663]   INFO - .manage.ContentRootDataService - Importing excluded root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/apk' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,890 [  12663]   INFO - .manage.ContentRootDataService - Importing excluded root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/classes' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,890 [  12663]   INFO - .manage.ContentRootDataService - Importing excluded root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/build/dependency-cache' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>' of module '<APPNAME>' 
2013-10-24 11:00:51,892 [  12665]   INFO - .manage.ContentRootDataService - Importing content root 'C:/Android/<APPNAME>Repo/<APPNAME>Project' for module '<APPNAME>Project' 
2013-10-24 11:00:51,892 [  12665]   INFO - .manage.ContentRootDataService - Importing excluded root 'C:/Android/<APPNAME>Repo/<APPNAME>Project/build' for content root 'file://C:/Android/<APPNAME>Repo/<APPNAME>Project' of module '<APPNAME>Project' 
2013-10-24 11:00:51,986 [  12759]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 15 ms 
2013-10-24 11:00:51,986 [  12759]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update 
2013-10-24 11:00:51,986 [  12759]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 0 ms 
2013-10-24 11:00:52,035 [  12808]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 10 ms 
2013-10-24 11:00:52,035 [  12808]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update 
2013-10-24 11:00:52,035 [  12808]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 0 ms 
2013-10-24 11:00:52,066 [  12839]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 8 ms 
2013-10-24 11:00:52,066 [  12839]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update 
2013-10-24 11:00:52,067 [  12840]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 1 ms 
2013-10-24 11:00:52,091 [  12864]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 8 ms 
2013-10-24 11:00:52,091 [  12864]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update 
2013-10-24 11:00:52,091 [  12864]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 0 ms 
2013-10-24 11:00:52,160 [  12933]   INFO - napi.vfs.newvfs.RefreshSession - [CR-IC-2706] [file://C:/Android/<APPNAME>Repo/<APPNAME>Project/<APPNAME>/<APPNAME>.iml] 
2013-10-24 11:00:52,161 [  12934]   INFO - napi.vfs.newvfs.RefreshSession - [CR-IC-2706] [file://C:/Android/<APPNAME>Repo/<APPNAME>Project/.idea/workspace.xml] 
2013-10-24 11:00:52,300 [  13073]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS) 
2013-10-24 11:00:52,403 [  13176]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:\Program Files\Java\jdk1.7.0_21 
2013-10-24 11:00:52,429 [  13202]   INFO - figurations.GeneralCommandLine - Command: C:\Program Files\Java\jdk1.7.0_21\bin\java

Any ideas? Thanks!

Using:

Win 7 64bit Eclipse + ADT fully updated to the most recent version.

The issue was the fact that i was importing a milti- project structure. I have resolved the issue by doing the following:

1) Changed all build.gradle dependencies files from

classpath 'com.android.tools.build:gradle:0.4'

to

classpath 'com.android.tools.build:gradle:0.6.+'

2) Changed settings.gradle file in the projects root directory to include just the names of other projects, not their directories (they are all in the same root directory). This is what it looks like:

include '<first_project>','<second_project>','ActionBarSherlock'

as well as changing all dependencies for local projects in gradle.build files to include just project names, not paths to them.

3) manually downloaded and unzipped gradle v1.8 and used that to import.

It works now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM