gpt4 book ai didi

android - 本地路径不存在 Android Studio 1.0

转载 作者:太空宇宙 更新时间:2023-11-03 11:37:06 25 4
gpt4 key购买 nike

我最近下载了最新的 Android Studio 1.0 版本,并立即开始竭尽全力尝试启动并运行一个新项目。我创建了一个新的 map 项目,一旦我开始运行,它就会给我以下信息:

Waiting for device.
Target device: motorola-xt1063-ZX1D3226RL
Uploading file
local path: C:\Users\Rich\Desktop\WebProjects\AndroidStudioProjects\BlocWork\BlocSpot\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.richluick.blocspot
Local path doesn't exist.

现在,我意识到那里也有类似的问题,但我尝试的都没有用。我按照大多数人的建议更新了 .iml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="APK_PATH" value="/build/apk/blocspot-debug-unaligned.apk" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/main" />
<output-test url="file://$MODULE_DIR$/build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

这对我不起作用。正如其他人所说,我尝试了 gradlew clean packagedebug --debug 命令并得到以下信息:

14:34:14.187 [ERROR] [org.gradle.BuildExceptionReporter]
14:34:14.190 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:34:14.198 [ERROR] [org.gradle.BuildExceptionReporter]
14:34:14.200 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:34:14.202 [ERROR] [org.gradle.BuildExceptionReporter] java.lang.NullPointerException (no error message)
14:34:14.204 [ERROR] [org.gradle.BuildExceptionReporter]
14:34:14.207 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
14:34:14.210 [ERROR] [org.gradle.BuildExceptionReporter] java.lang.NullPointerException

我不明白为什么或如何在编译他的 gradle 时抛出空指针异常。我已经为此工作了几个小时,但我就是无法让它工作。我希望有人可以帮助我。错误的堆栈跟踪如下。

14:34:14.212 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.internal.compiler.PreDexCache.createItemNode(PreDexCache.java:189)
14:34:14.214 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreDexCache.createItemNode(PreDexCache.java:60)
14:34:14.216 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreProcessCache.saveItems(PreProcessCache.java:486)
14:34:14.218 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreProcessCache.clear(PreProcessCache.java:375)
14:34:14.220 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.builder.internal.compiler.PreProcessCache$clear$0.call(Unknown Source)
14:34:14.222 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
14:34:14.224 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
14:34:14.226 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
14:34:14.229 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.BasePlugin$_configureProject_closure1.doCall(BasePlugin.groovy:318)
14:34:14.231 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:34:14.232 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:34:14.234 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:34:14.236 [ERROR] [org.gradle.BuildExceptionReporter] at java.lang.reflect.Method.invoke(Method.java:483)
14:34:14.237 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
14:34:14.239 [ERROR] [org.gradle.BuildExceptionReporter] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
14:34:14.241 [ERROR] [org.gradle.BuildExceptionReporter] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:278)
14:34:14.243 [ERROR] [org.gradle.BuildExceptionReporter] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
14:34:14.245 [ERROR] [org.gradle.BuildExceptionReporter] at groovy.lang.Closure.call(Closure.java:423)
14:34:14.246 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
14:34:14.248 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
14:34:14.250 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:83)
14:34:14.251 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
14:34:14.254 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
14:34:14.257 [ERROR] [org.gradle.BuildExceptionReporter] at com.sun.proxy.$Proxy12.buildFinished(Unknown Source)
14:34:14.259 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:111)
14:34:14.262 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
14:34:14.264 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
14:34:14.268 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
14:34:14.270 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
14:34:14.272 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
14:34:14.276 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
14:34:14.281 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
14:34:14.284 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
14:34:14.287 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
14:34:14.289 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
14:34:14.291 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
14:34:14.293 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
14:34:14.346 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
14:34:14.348 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
14:34:14.351 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
14:34:14.353 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
14:34:14.356 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33)
14:34:14.576 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
14:34:14.578 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:34:14.581 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:34:14.583 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:34:14.631 [ERROR] [org.gradle.BuildExceptionReporter] at java.lang.reflect.Method.invoke(Method.java:483)
14:34:14.633 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
14:34:14.636 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
14:34:14.649 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
14:34:14.651 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:34:14.653 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:34:14.655 [ERROR] [org.gradle.BuildExceptionReporter] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:34:14.657 [ERROR] [org.gradle.BuildExceptionReporter] at java.lang.reflect.Method.invoke(Method.java:483)
14:34:14.659 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
14:34:14.661 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
14:34:14.664 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
14:34:14.669 [ERROR] [org.gradle.BuildExceptionReporter]

最佳答案

试试这个。它最终帮助了我!!!

  1. 关闭安卓工作室
  2. 下载http://goo.gl/v0UPm6
  3. 转到\sdk
  4. 将“tools”重命名为“tools1”(以备不时之需)
  5. 将此 zip 解压缩到\sdk
  6. 它将在\sdk 中创建 tools 文件夹
  7. 重启工作室,错误就会消失

来源:Google Plus

PD:谢谢你,Aman ;) PD2:Android SDK Tools 24.0.1 即将推出!!!

关于android - 本地路径不存在 Android Studio 1.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27387559/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com