android jetpack 入门项目无法运行

标签 android android-studio kotlin android-jetpack

我是 android 开发的新手,刚刚按照本教程在 android studio 3.2 (canary) 中创建了我的第一个“hello world”项目。 https://developer.android.com/jetpack/docs/getting-started

然后我只是做了 Build-> make project project tried to build 并给了我以下错误。

Could not get unknown property 'archLifecycleVersion' for root project 'JetpackHelloWorld' of type org.gradle.api.Project.

但我能够在我发布的问题的答案的帮助下解决该错误。 android jetpack project gives archlifecycleversion build error

解决该错误后,我尝试再次构建,但现在出现以下错误。

the '-d' option with a directory destination is ignored because '-Xbuild-file' is specified

运行被禁用

如您在屏幕截图中所见,应用程序的运行选项被禁用,如果我单击下拉菜单,它会要求我编辑配置,我应该在一个空项目中进行什么样的配置?

run disabled

but then I clicked on Edit Configurations and added a android application configuration, but at the point of selecting modules there was no modules in drop down list to select from, and now I cant run my app because i get the error "confuguration is not valid" I also see a red cross icon on my app name near the run button, I think that is because I have not selected a module? but how can I select one when there isnt any?

最佳答案

试着点击右边那个火箭东西右边两个按钮(Gradle Sync),看看是否有帮助

关于android jetpack 入门项目无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50472779/

相关文章:

kotlin - Kotlin-字 rune 字与预期的Int类型不一致

java - Kotlin/Java-如何识别内部软件包?

android - 导航组件 Kotlin - 无法从当前目的地找到

android - Match_parent 在 Android Studio 2.3 的 ImageView 中不起作用

android - 通过获取 mediaPlayer 的幅度来制作进度条动画

Android:为单元和功能测试设置项目

Android Studio Design 不显示任何内容

android - RadioButton 在取消选中后留下黑色选中的圆圈

android-3.0-honeycomb - 在蜂窝中执行 "lights out mode"的 API 调用在哪里?

java - 使用 Android Studio 3.1 和 gradle 3.1.0 构建项目时出错