android:无法建立专案错误:无法从

时间:2018-12-04 13:51:44

标签: java android build

我是android开发的新手,我只是改变了我的电脑,我从旧的电脑上复制了android项目并粘贴到了新的pc中,未将项目导出为zip文件:'(, 当我在android studio(新电脑)中打开项目时,出现以下错误,

  

无法从F:\ ZahraUniversity \ app \ src \ main \ AndroidManifest.xml中读取packageName

     

org.gradle.api.ProjectConfigurationException:配置项目':app'时发生问题。       在org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:94)       在org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:89)       在org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:70)       在org.gradle.configuration.project.LifecycleProjectEvaluator.access $ 100(LifecycleProjectEvaluator.java:34)       在org.gradle.configuration.project.LifecycleProjectEvaluator $ ConfigureProject.run(LifecycleProjectEvaluator.java:110)       在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)处       在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)       在org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)       在org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:667)       在org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:136)       在org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)       在org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62)       在org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)       在org.gradle.initialization.DefaultGradleLauncher $ ConfigureBuild.run(DefaultGradleLauncher.java:261)       在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)处       在org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)       在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)       在org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:173)       在org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:132)       在org.gradle.initialization.DefaultGradleLauncher.getConfiguredBuild(DefaultGradleLauncher.java:110)       在org.gradle.internal.invocation.GradleBuildController $ 2.call(GradleBuildController.java:87)       在org.gradle.internal.invocation.GradleBuildController $ 2.call(GradleBuildController.java:84)       在       等等等等

我不知道发生了什么,我已经尝试了其他答案,每个人都在说编辑清单文件,但是我的项目在(app \ src \ main)中不包含任何清单 这就是我的项目应用程序文件夹的样子 Project app folder image

我不知道这是怎么回事,请帮助我被卡住:(

1 个答案:

答案 0 :(得分:0)

如果没有清单文件,则需要创建一个清单文件。

引用官方文档:

  

每个应用项目都必须在项目源集的根目录中具有一个AndroidManifest.xml文件(确切地说是该名称)。清单文件描述了有关Android构建工具,Android操作系统和Google Play的应用程序的基本信息。

App Manifest Overview