Codename One中的谷歌地图项目将不会构建



我正试图使用NetBeans在Codename One中构建一个谷歌地图测试应用程序。我已经遵循了CodenameOne网站上的所有指示(https://www.codenameone.com/blog/mapping-natively.html)然而,当我试图将Android版本发送到他们的服务器进行测试时,我收到了一个错误。

我在这个项目中编辑过的唯一文件是主Java文件,我刚刚从上面的Codename One网站复制了代码,并更改了包名和类名以正确运行。

此外,当我在模拟器上运行它时,它似乎可以工作。我是不是错过了什么,或者我能做些什么来让它发挥作用?

错误如下:

  • 出了什么问题:无法从/tmp/build7941379349764370420xxx/MyApplication/src/main/AndroidManifest.xml 读取packageName

  • 尝试:使用--debug选项运行以获得更多日志输出。

  • 例外情况是:java.lang.RuntimeException:无法从/tmp/build7941379349764370420xxx/MyApplication/src/main/AndroidManifest.xml读取packageName网址:com.android.builder.core.VariantConfiguration.getPackageFromManifest(VariantConfiguration.java:999)网址:com.android.builder.core.VariantConfiguration.getOriginalApplicationId(VariantConfiguration.java:780)网址:com.android.build.gradle.tasks.GenerateBuildConfig$ConfigAction$_execute_closure1.doCall(GenerateBuildConfig.groovy:167)在com.android.build.gradle.tasks.GenerateBuildConfig$ConfigAction$_execute_closure1.doCall(GenerateBuildConfig.groovy)网址:org.gradle.api.internal.ConventionAwareHelper$2.getValue(ConventionAwareHelper.java:84)位于org.gradle.api.internal.ConationAwareHelper$MappedPropertyImpl.getValue(ConventionAwareHelper.java:136)网址:org.gradle.api.internal.ConfectionAwareHelper.getConventionValue(ConventionAwareHelper.java:114)网址:com.android.build.gradle.tasks.GenerateBuildConfig_Dcorated.getBuildConfigPackageName(未知来源)网址:org.gradle.internal.reflect.JavaMethod.reinvoke(JavaMethod.java:75)位于org.gradle.api.internal.project.taskfactory.AnnotationAccessingTaskFactory$PropertyInfo$4.create(AnnotationProcessingTaskFactory.java:458)位于org.gradle.util.SingleMessageLogger.whileDisabled(SingleMessageLogger.java:166)位于org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$PropertyInfo.getValue(AnnotationAccessingTaskFactory.java:456)位于org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$Validator.validate(AnnotationAccessingTaskFactory.java:277)位于org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:41)位于org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmpitySourceFilesTaskexecuter.java:52)位于org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.exexecute(SkipTaskWithNoActionsExecuter.java:52)位于org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnyIfTaskexecuter.java:53)位于org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)位于org.gradle.expension.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)位于org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)网址:org.gradle.execution.taskgraph.AbstractTaskPlanExecutiator$TaskExecutiorWorker.processTask(AbstractTaskPlanExecutor.java:66)网址:org.gradle.expension.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)网址:org.gradle.expension.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)位于org.gradle.expension.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)网址:org.gradle.expension.SelectedTaskExecutionAction.expenate(SelectedTaskExecutionAction.java:37)在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecutor.java:37)在org.gradle.exexecution.DefaultBuildExecuter.access$000(DefaultBuildExecutor.java:23)在org.gradle.expension.DefaultBuildExecuter$1.prough(DefaultBuildExecuter.java:43)网址:org.gradle.exexecution.DryRunBuildExecutionAction.exexecute(DryRunBuildingExecutionAction.java:32)在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecutor.java:37)在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecutor.java:30)位于org.gradle.sitialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)网址:org.gradle.internal.Factories$1.create(Factories.java:22)网址:org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)网址:org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)位于org.gradle.sitialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)位于org.gradle.sitialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)位于org.gradle.sinitialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)位于org.gradle.sinitialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)网址:org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)网址:org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)位于org.gradle.sitialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)位于org.gradle.sitialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)位于org.gradle.selauncher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecutor.java:94)网址:org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)网址:org.gradle.selauncher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)位于org.gradle.selauncher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecutor.java:43)位于org.gradle.selauncher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecutor.java:28)位于org.gradle.selauncher.exec.ContinusBuildActionExecuter.execute(ContinuousBuildActionExecutor.java:75)位于org.gradle.selauncher.exec.ContinusBuildActionExecuter.execute(ContinuousBuildActionExecutor.java:45)位于org.gradle.selauncher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)位于org.gradle.selauncher.daemon.server.exec.BuildCommandOnly.exexecute(BuildCommandOnly.java:36)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecactionLogger.java:26)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfsSingleUsed daemon.java:34)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)位于org.gradle.selauncher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)网址:org.gradle.util.Swaper.swap(Swapper.java:38)位于org.gradle.selauncher.daemon.server.exec.ForwardClientInput.execure(ForwardClientInput.java:72)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)网址:org.gradle.selauncher.daemon.server.health.DemonHealthTracker.execute(DaemonHealthTracker.java:40)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66)位于org.gradle.selauncher.daemon.server.exec.BuildCommandOnly.exexecute(BuildCommandOnly.java:36)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildingEnvironment.java:72)位于org.gradle.selauncher.daemon.server.exec.BuildCommandOnly.exexecute(BuildCommandOnly.java:36)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)网址:org.gradle.selauncher.daemon.server.health.HindGCAfterBuild.exexecute(HintGCAfterBuild.java:41)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespandWithBusy.java:50)位于org.gradle.selauncher.daemon.server.DemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)网址:org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)在org.gradle.internal.concurrent.StoppableExecutiorImpl$1.run(StoppableExecutiorimpl.java:40)

BUILD FAILED

如果您更改了包名称,则需要在所有位置进行更改以匹配。也就是说,您需要打开codenameone_settings.properties并将其更改为与您的新软件包名称匹配。

相关内容

  • 没有找到相关文章

最新更新