问题描述
我觉得谁写的教程的人忘记了读书人他们是新的课题。我们应该了解那些通过步进的事情,但如果出现问题,我们不知道去哪里找的错误。
我的Windows 7专业版,我还没有尝试在此计算机上针对Android的Eclipse开发(虽然我使用Eclipse进行其他的东西)。我下载了Android教程刚才,与默认安装了它(我翻了一番,从2G的内存大小4G无论组件是打开的),并告诉它来启动它在安装后。 帮助/关于说,这是机器人工作室1.3.1。
我也跟着来创建一个新的项目,改变了几个文件,它显示的名字教程说明。当我尝试运行它,在AS窗口底部的日志文件中说:
On poking around, I seed that the "MyActivity.java" file is underlined in red, and there are three references in it to "R", also red. If I hover over any one, it says it cannot resolve that symbol.
I also found a file named "v23\values-v23.xml" that has red text for what look like a couple of android components; one of them is the following:
and the value for 'parent' is underlined in red. Since this looks like it indicates an error with something called "parent" and my runtime error message says "parent", it seems logical they're related.
But I don't know where to go from there. I vaguely remember an instruction to download an Android SDK, but thought that was included with Android Studio (can't imagine why it wouldn't be). It was called the "Android Studio SDK Bundle", I figured that included what was needed.
Other SO questions on the subject are evidently too old, saying to click on menu options that no longer exist, etc., or say things like "open the gradle file" and I can't find one, or "be sure your target project version is set to 11", and I don't have any idea what that is or where to find it.
Please be explicit about menus to use and options to click on; remember that, though I'm an experienced Java programmer, I've not used IntelliJ and I've not programmed on Android, so I don't know the names of things specific to either environment.
Daniel Nugent called this shot: at the bottom of the left-hand pane is an option called "Gradle Scripts". My first one was named build.gradle (Project: MyFirstApp), and my second build.gradle (Module: app). Double-clicked on the second one and changed "compileSdkVersion 22" to "compileSdkVersion 23", then attempted a rebuild which failed. The question Daniel Nugent referred to also mentions ensuring I have "Android M libraries" and points to a button on the Toolbar to start the SDK manager; that showed that an update "was available" for Android 5.1 (Lollipop). I couldn't figure out how to update from that window; I guessed at clicking on a link in that window (at the bottom) saying "Launch Standalone SDK Manager", and updated from there (which took a LONG time - 15-20 minutes).
Then the rebuild on Gradle succeeded and running the application (which took perhaps a minute or a minute and a half, longer than I expected) produced the expected window to pick a device, etc. The emulator then ran the "Hello, World" app as desired.
My thanks to all who responded; now if I can just figure out what's wrong with the debug driver for my Galaxy s5...
这篇关于麻烦与Android教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!