赞
踩
第一次启动鸿蒙开发工具DevEco Studio 3以后,界面是这样的,左侧有四个按钮,第四个是Import Sample,也就是可以导入一些系统自带的例子,体验开发工具的能力。
点击“Import Sample”,出现如下界面,让选择一个想要导入的例子,在common分类下,有一个hello world,这就是我们写过无数次的那个程序啊,在鸿蒙开发工具里,写都不用写,导入就能体验,我喜欢!
选中以后点击Next按钮进入下一步,
Project name和Project location就是工程名字和保存路径了,不需要改,点击Finish应该就可以了吧?但是我这里 Finish按钮是灰色的,无法点击。
仔细一看有个提示,需要Install Git to import a sample,也就是需要安装Git才可以的,如果你安装了Git可以点击Config Git连接配置也一下Git的存放位置即可。
安装完git以后,配置一下,就可以进行下一步了。下载速度很快
下载完毕,自动加载,激动,有点小激动
感觉跟Android studio 太相似了,哈哈
这个导入过程比Android studio快,感觉爽一些
快的原因应该就是因为这里吧
同步完以后,提示了一个错误:Cause: sdkRoot should not be empty,运行个Hello world也不顺利啊,
A problem occurred configuring root project 'HelloWorld'.
> sdkRoot should not be empty
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'HelloWorld'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:68)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$400(LifecycleProjectEvaluator.java:51)
at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:105)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:366)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:426)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211)
at org.gradl
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。