*******************************************************************************
** WARNING: ANDROID_HOME does not point to an Android SDK **
*******************************************************************************
The location pointed to by the ANDROID_HOME environment variable:
I:\Sdk
doesn't appear to contain an Android SDK.
If ANDROID_HOME is an Android SDK, ensure it is the root directory
of the Android SDK instance such that
$ANDROID_HOME\cmdline-tools\9.0\bin\sdkmanager.bat
is a valid filepath.
Briefcase will proceed using its own SDK instance. *******************************************************************************
报错后会有类似2024_01_10-11_07_12.run.log的文件
Log saved to I:\PycharmProjects\pythonProject\HelloWorld\logs\briefcase.2024_01_10-11_07_12.run.log
拉到最下面出现c盘绿色那条才是正确的android_sdk位置,(我自己安装的sdk明明在I盘,它跑去找BeeWare里的sdk,你哪个模块?软件?要用到sdk也许就藏在某个地方,多范围找一找)
系统变量添加(每个人路径都不一样但是最后一定是类似android_sdk这么样的)
ANDROID_HOME
C:\Users\Administrator\AppData\Local\BeeWare\briefcase\Cache\tools\android_sdk
另一个系统变量原有的Path,点进去新建,把android_sdk目录里(tools、platform-tools、tools\bin、build-tools\30.0.3、cmdline-tools\9.0\bin)几个文件统统添加进去,这东西不嫌多。
大概填
${PATH}:$ANDROID_HOME\tools:$ANDROID_HOME\platform-tools:$ANDROID_HOME\tools\bin:$ANDROID_HOME\build-tools\30.0.3:$ANDROID_HOME\cmdline-tools\9.0\bin
或者
%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools\bin;%ANDROID_HOME%\build-tools\30.0.3;%ANDROID_HOME%\cmdline-tools\9.0\bin
不放心还可以再新建个
C:\Users\Administrator\AppData\Local\BeeWare\briefcase\Cache\tools\android_sdk\cmdline-tools\9.0\bin\sdkmanager
(哪个可以放哪个,不嫌多)