C++ Builder 10.4 Android应用初探 -- 01-环境准备

本文详细介绍了如何安装C++Builder并确保在安装过程中选择Android相关选项,同时指导如何配置JDK路径,解决因路径不一致导致的编译错误。此外,还讲解了如何开启Android设备的USB调试,安装Google USBDriver,以及处理可能遇到的hosts文件映射问题。通过这些步骤,可以实现C++Builder直接连接Android设备进行应用的自动安装和调试。
摘要由CSDN通过智能技术生成

安装程序

  1. 安装C++ Builder,注意需要勾选Android相关选项。

  2. 安装JDK,并在Tools -》Option -》Deployment -》SDK Manager 中,选择下图的两个路径,Java标签页的两个路径与你的JDK路径一致。

在这里插入图片描述
如果路径不一致,编译工程后,会有报错,提示如下:
在这里插入图片描述

  1. 第一次运行,编译后,会提示:

在这里插入图片描述
是因为没有连接Android设备,此时在工程路径下,已经有apk文件了。

  1. 配置环境,使C++ Builder中能发现你的Android Q设备
  • 如果每次编译都需要手动传文件,那很麻烦,C++ builder中其实可以连接手机,并自行安装应用
  • 打开Android手机的:开发人员选项,并打开USB调试功能
  • 在Android SDK安装路径下,一般为:C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-*****,找到SDK Manager.exe,并以管理员运行在这里插入图片描述
  • 选择安装 :Google USB Driver在这里插入图片描述
  • 如果安装不上,在hosts文件中,增加下图的映射在这里插入图片描述

更详细的说明,见这篇文章
https://www.cnblogs.com/yyyyinsheng/p/15134182.html

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
需要先安装Patch1。 Patch 2 for RAD Studio 10.4 now available This patch addresses a number of issues in RAD Studio 10.4, pertaining to Delphi Compiler, the RAD Studio IDE in general and the new LSP-based Code Insight in particular, plus C++ Builder Android exceptions and some debugger issues. The installation of this patch requires a prior installation of Patch #1 (separately available on GetIt and in the download portal). Installing this patch is recommended for all RAD Studio 10.4 customers. Note that this patch is fairly large to download (around 190 MB). The patch includes detailed installation instructions as part of the Readme. Please read the steps carefully (or the corresponding steps in this blog post), as the GetIt download does not install the patch automatically. You must follow the instructions in order to install. Just using GetIt is not enough. List of Customer Reported Issues Addressed in 10.4 Patch 2 RAD Studio 10.4 Patch #2 addresses the following issues reported by customer on Embarcadero Quality Portal (https://quality.embarcadero.com): RSP-29628 VCL Grids bug RSP-29560 [REGRESSION] Misalignment in TStringGrid, StretchDraw method in OnDrawCell RSP-29412 Compiler generates incorrect code for if-then RSP-29402 Delphi 10.4 TStringGrid.OnDrawCell bug RSP-29374 Wrong rect coords in TStringGridDrawCell, so image are drawn at wrong position RSP-29347 [DelphiLSP] IDE Crashes when view form as text is selected and running LSP server RSP-29310 Internal error L891 when linking because of complex types based on records with class var RSP-29299 CODEGEN bug in managed fields initialization, associated with new management operators. RSP-29271 [DelphiLSP] Code Insight adds unneeded () when changing procedures/functions RSP-29256 Compiler generates wrong code for template function RSP-29227 Incorrect property value obtained from the record RSP-29226 Access violation with working code under 10.2 RSP-29218 compiling static library under Android error E4620 processing resource .fmx -2 raised RSP-29172 Access Violation when opening License Manager RSP-29142 GoTo statements not working RSP-29136 Dialog constantly pops up during debugging RSP-29129 iOS App simply crashes with a TWebBrowser on it. RSP-29127 Compiler internal error if you ignore the result of a function that returns a generic record RSP-29124 ICE E1812 RSP-28989 License Manager has access violation error when i click on Workstation Licenses RSP-28887 Space does not finish code completion RSP-28857 Default(T) generates bad code for managed record RSP-28821 [Regression] TStringGrid.OnDrawCell parameter Rect contains wrong values RSP-28808 Project options dialog page "Delphi Compiler" is not populated when opening the dialog RSP-28796 RVO for M-records: initialisation of local variables RSP-28761 [REGRESSION] E2154 Type 'T' needs finalization - not allowed in variant record RSP-28737 Compiler error when inlining new Bit Counting Standard Functions RSP-28735 Managed Records Causing Internal Compiler Error RSP-28717 Delphi Package fails to compile RSP-28701 Bind visually on TDBGRID kills the IDE RSP-28669 [BadCG] Value M-record parameters: improper AddRefRecord RSP-28659 RVO for M-records: assignment to local variables RSP-28616 [BadCG] Operator Assign should not allow non-default calling conventions RSP-28615 [BadCG] In the absence of Initialize, finalisation is not guaranteed for local variables RSP-28552 Poor code generation for local managed record variables RSP-28499 Options - Translation tools - Font - Corrupted? RSP-28476 LSP ErrorInsight in Structure Pane only shows one keystroke after editor RSP-28400 [BadCG] Operator Assign is not always invoked for fields RSP-28372 [Regression] Bad codegen in function returning generic type RSP-27268 C++ Builder 10.3.3 Android Exceptions RSP-27251 Internal error when trying to inline with optimization on RSP-24079 Package version is broken RSP-23403 Build for linux 64 error RSP-23024 Record helper class constructor gives senseless compiler warning RSP-22318 Pointer type check missed when object field is a dynarray RSP-21554 Compiler generates incorrect code for parameterized record type RSP-21248 Const dynamic array unexpectedly contains uninitialized data RSP-20372 A generic "reference to function" will only match the first of several overloaded functions RSP-19714 Win32 compiler - Memory corruption with array helpers RSP-18241 *.c source files, added to C++ project, got added to DeploymentManager file list RSP-18148 AV in TList.Remove (64-bit compiler only)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值