我正在尝试使用NetBeans在Codename One中构建Google Maps测试应用程序。我已遵循CodenameOne网站上的所有指示(https://www.codenameone.com/blog/mapping-natively.html),但是当我尝试将Android版本发送到他们的服务器进行测试时,我收到错误消息。
我在这个项目中编辑的唯一文件是主Java文件,我刚从上面的Codename One网站复制了代码,并更改了包名和类名以便正确运行。
此外,当我在模拟器上运行它时,它似乎工作。我是否想念一些东西,或者我能做些什么来使这项工作?
错误如下:
出了什么问题: 无法从/tmp/build7941379349764370420xxx/MyApplication/src/main/AndroidManifest.xml(/p>
尝试: 使用--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.ConventionAwareHelper $ MappedPropertyImpl.getValue(ConventionAwareHelper.java:136) 在org.gradle.api.internal.ConventionAwareHelper.getConventionValue(ConventionAwareHelper.java:114) at com.android.build.gradle.tasks.GenerateBuildConfig_Decorated.getBuildConfigPackageName(Unknown Source) 在org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ PropertyInfo $ 4.create(AnnotationProcessingTaskFactory.java:458) 在org.gradle.util.SingleMessageLogger.whileDisabled(SingleMessageLogger.java:166) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ PropertyInfo.getValue(AnnotationProcessingTaskFactory.java:456) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory $ Validator.validate(AnnotationProcessingTaskFactory.java:277) 在org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:41) 在org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52) 在org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 在org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) 在org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203) 在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter $ EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor $ TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor $ TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50) 在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25) 在org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110) 在org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) 在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) 在org.gradle.execution.DefaultBuildExecuter.access $ 000(DefaultBuildExecuter.java:23) 在org.gradle.execution.DefaultBuildExecuter $ 1.proceed(DefaultBuildExecuter.java:43) 在org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) 在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) 在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30) 在org.gradle.initialization.DefaultGradleLauncher $ 4.run(DefaultGradleLauncher.java:154) 在org.gradle.internal.Factories $ 1.create(Factories.java:22) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52) 在org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151) 在org.gradle.initialization.DefaultGradleLauncher.access $ 200(DefaultGradleLauncher.java:32) 在org.gradle.initialization.DefaultGradleLauncher $ 1.create(DefaultGradleLauncher.java:99) 在org.gradle.initialization.DefaultGradleLauncher $ 1.create(DefaultGradleLauncher.java:93) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62) 在org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93) 在org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82) at org.gradle.launcher.exec.InProcessBuildActionExecuter $ DefaultBuildController.run(InProcessBuildActionExecuter.java:94) 在org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) 在org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28) 在org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75) 在org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:45) 在org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52) 在org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.ForwardClientInput $ 2.call(ForwardClientInput.java:74) 在org.gradle.launcher.daemon.server.exec.ForwardClientInput $ 2.call(ForwardClientInput.java:72) 在org.gradle.util.Swapper.swap(Swapper.java:38) 在org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:40) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66) 在org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72) 在org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy $ 1.run(StartBuildOrRespondWithBusy.java:50) 在org.gradle.launcher.daemon.server.DaemonStateCoordinator $ 1.run(DaemonStateCoordinator.java:246) at org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) 在org.gradle.internal.concurrent.StoppableExecutorImpl $ 1.run(StoppableExecutorImpl.java:40)
建立失败
答案 0 :(得分:0)
如果您更改了包名称,则需要在任何地方更改它以匹配。那就是你需要打开codenameone_settings.properties
并更改它以匹配你的新包名称。