Android Studio:如何逐步调试旧版本的 Android SDK [英] Android Studio: How to debug older version of Android SDK step-by-step

查看:44
本文介绍了Android Studio:如何逐步调试旧版本的 Android SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个针对 Android SDK v21 的 Android 项目.现在我需要在装有 Android 4.4(即 SDK v20)的设备上调试它.我如何告诉 Android Studio 将旧版本的源代码附加到内部类,以便我可以单步调试它们?

I have an Android project targetting the Android SDK v21. Now I need to debug it on a device with Android 4.4 (i.e. SDK v20). How do I tell Android Studio to attach an older version of the source to the internal classes so that I can step through them?

推荐答案

这里最好的解决方案是将编译 SDK 版本设置为 20.这样构建工具将使用 SDK 版本 20 编译您的项目,并且您可以调试您的应用程序.

Here the best solution is to set compile SDK version to 20. So that build tools will compile your project using SDK version 20 and you can debug your app.

当您在项目中使用多个模块时,您需要为每个模块设置相同的编译 SDK 版本.

When you use several modules in your project you need to set same compile SDK version to each module.

这篇关于Android Studio:如何逐步调试旧版本的 Android SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆