我正在尝试迁移Android项目以使用Gradle。我正在使用Eclipse来开发它。我像Google指示的那样导出了项目,当我尝试导入它时,我得到以下内容:
A path must be specified!
Consult IDE log for more details (Help | Show Log)
我发现这个问题的结果是:
然而,好像我们有不同的事情出错了。在玩,我也得到了这个错误,并尝试了这篇文章中建议的一切:
Android Studio - migrating projects from eclipse
上述帖子中的一条评论提到这是一个已知问题,但它已经在6月份出现,从那以后出现了新版本的Android Studio。我认为这可能是一个单独的问题。
我已经尝试将gradle.build文件中的依赖项更改为“... 5. +”和“... 6. +”其他建议,但它也不起作用。
我也手动安装了最新版本的Gradle,解压缩并指向AS使用它。结果相同。
有没有其他人有这个问题?我可以在Android Studio中打开我的应用程序并在不使用Gradle的情况下运行它,以防万一。
以下是日志的一部分:
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
有什么想法吗?谢谢!
使用:
赢得7 64位 Eclipse + ADT完全更新到最新版本。答案 0 :(得分:0)
问题在于我正在进口一个多元化的项目结构。我通过执行以下操作解决了这个问题:
1)更改了
中的所有build.gradle依赖项文件classpath 'com.android.tools.build:gradle:0.4'
到
classpath 'com.android.tools.build:gradle:0.6.+'
2)更改了项目根目录中的settings.gradle文件,仅包含其他项目的名称,而不包括其目录(它们都在同一个根目录中)。这就是它的样子:
include '<first_project>','<second_project>','ActionBarSherlock'
以及更改gradle.build文件中本地项目的所有依赖项,以仅包含项目名称,而不包括它们的路径。
3)手动下载并解压缩gradle v1.8并用于导入。
现在有效。