Eclipse 上的 Android 在调试时遵循正确的 Android 源代码版本

标签 android eclipse android-source

我正在调试目标为 android-17(最低版本 android-11)的应用程序。
我用的模拟器是android 4.0.4,也就是android-14或者android-15

当我跟踪到 android 源代码方法时,调试器将我带到 android-17 源代码,它与 android-14 源代码不同,所以我结束了跟随错误的代码。

当我选择“New Android Project”时,项目框架是由Eclipse 创建的。它有一个包含 android-17 代码(Android 4.2)的文件夹,可能是因为目标版本是这样说的。但是编译后的应用程序可以在 android-14 AVD 模拟器上运行。

如何跟随调试器进入正确的 android 源代码?

最佳答案

这不是您应该寻找的目标 android 版本,它是项目构建目标

要更改它,请从 Eclipse 中的包资源管理器中选择您的项目,然后右键单击并选择 properties 或从菜单栏中选择 Project 并选择 属性

您的项目的属性窗口将打开,选择 Android,您应该会看到与此类似的内容:

project android properties

在该窗口中,选择您要使用哪个 Android 版本编译您的项目。此外,您在项目向导创建期间选择了项目构建目标(它要求提供目标版本、构建版本(称为“编译”)和最低版本)。

关于Eclipse 上的 Android 在调试时遵循正确的 Android 源代码版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15341046/

相关文章:

android - Retrofit 中的错误 call.enqueue

android - 在有根电话上以编程方式启用 GPS 和网络位置?

java - Libgdx - 从 Rectangle.overlap(Rectangle) 获取相交矩形

build - Hiddenapi 上的 SIGILL 构建 AOSP9.0 失败

android - 使用Android.mk复制/系统中的多个txt文件

android - 外部 HTML Assets 未被 React Native bundle 在生产构建中以供 Webview 使用

android - 如何获取 callLog.calls 中最频繁的值条目的数量?

java.io.IOException : Server returned HTTP response code: 403 for URL: http://start. spring.io

eclipse 错误 : Websockets are currently only supported in Tomcat

android - 编辑 android VideoView 帧