我在我的Mac上使用android studio但是gradle安装有问题;我无法看到.gradle文件夹只有两个文件夹:守护进程和本机,根本没有包装文件夹,我已经尝试重新安装android studio但它仍然无法正常工作。这里有什么问题? Tks很多
org.gradle.tooling.GradleConnectionException:无法使用Gradle安装' / Applications / Android Studio.app/Contents/gradle/gradle-2.10'运行构建操作。 在org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:59) 在org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor $ 1 $ 1.run(DefaultAsyncConsumerActionExecutor.java:57) at org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl $ 1.run(StoppableExecutorImpl.java:40) at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:918) 在java.lang.Thread.run(Thread.java:695) 在org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46) 在org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter.run(DefaultBuildActionExecuter.java:46) 在org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.doResolveProjectInfo(GradleProjectResolver.java:188) 在org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.access $ 300(GradleProjectResolver.java:65) 在org.jetbrains.plugins.gradle.service.project.GradleProjectResolver $ ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:367) 在org.jetbrains.plugins.gradle.service.project.GradleProjectResolver $ ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:339) 在org.jetbrains.plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:230) 在org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:97) 在org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:65) 在com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl $ 1.produce(RemoteExternalSystemProjectResolverImpl.java:41) 在com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl $ 1.produce(RemoteExternalSystemProjectResolverImpl.java:37) 在com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59) at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37) at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49) at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:51) 在com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138) 在com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:124) 在com.intellij.openapi.externalSystem.util.ExternalSystemUtil $ 3.execute(ExternalSystemUtil.java:419) 在com.intellij.openapi.externalSystem.util.ExternalSystemUtil $ 4 $ 2.run(ExternalSystemUtil.java:500) 在com.intellij.openapi.progress.impl.CoreProgressManager $ TaskRunnable.run(CoreProgressManager.java:563) 在com.intellij.openapi.progress.impl.CoreProgressManager $ 2.run(CoreProgressManager.java:142) 在com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446) 在com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54) 在com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127) 在com.intellij.openapi.progress.impl.ProgressManagerImpl $ 1.run(ProgressManagerImpl.java:126) 在com.intellij.openapi.application.impl.ApplicationImpl $ 8.run(ApplicationImpl.java:366) at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:303) 在java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:918) 在java.lang.Thread.run(Thread.java:695) 在org.jetbrains.ide.PooledThreadExecutor $ 1 $ 1.run(PooledThreadExecutor.java:55)
答案 0 :(得分:1)
解决方案:1
删除 .gradle
中的'C:\Users\Username\'
文件夹,然后我以管理员权限打开了AndroidStudio。它解决了你的问题。
解决方案:2
继续项目 - >设置 - >编译器(基于Gradle的Android项目),找到文本字段" VM选项" 和放在那里:
-Xmx512m -XX:MaxPermSize=512m