【发布时间】:2017-12-24 12:44:40
【问题描述】:
我尝试为 Android 构建我的 Meteor 项目。如图所示:
Generate apk file for meteor app
因此,在我的 Ubuntu 机器上,我从以下位置安装了 android SDK:https://developer.android.com/studio/index.html 其中显示:“只需获取命令行工具”。安装路径为/home/pcmagas/Λήψεις/tools,包含以下文件:
drwxr-xr-x 6 pcmagas pcmagas 4096 Ιούλ 19 11:43 ./
drwxr-xr-x 4 pcmagas pcmagas 4096 Ιούλ 19 11:43 ../
-rwxr--r-- 1 pcmagas pcmagas 4741 Μάρ 29 00:46 android*
drwxr-xr-x 2 pcmagas pcmagas 4096 Μάρ 29 00:46 bin/
-rwxr--r-- 1 pcmagas pcmagas 643536 Μάρ 29 00:46 emulator*
-rwxr--r-- 1 pcmagas pcmagas 394336 Μάρ 29 00:46 emulator-check*
drwxr-xr-x 6 pcmagas pcmagas 4096 Μάρ 29 00:46 lib/
-rwxr--r-- 1 pcmagas pcmagas 12191 Μάρ 29 00:46 mksdcard*
-rwxr--r-- 1 pcmagas pcmagas 1257 Μάρ 29 00:46 monitor*
-rw-r--r-- 1 pcmagas pcmagas 629709 Μάρ 29 00:46 NOTICE.txt
-rw-rw-r-- 1 pcmagas pcmagas 919 Ιούλ 19 11:43 package.xml
drwxr-xr-x 7 pcmagas pcmagas 4096 Μάρ 29 00:46 proguard/
-rw-r--r-- 1 pcmagas pcmagas 139 Μάρ 29 00:46 source.properties
drwxr-xr-x 2 pcmagas pcmagas 4096 Μάρ 29 00:46 support/
我还用这个值导出了ANDROID_HOME 环境变量:
echo $ANDROID_HOME
/home/pcmagas/Λήψεις/tools
并将PATH 变量改成这个:
export PATH=${PATH}:$ANDROID_HOME
然后我cd我的流星项目,我给出以下命令:
meteor add-platform android
但我收到以下错误:
✗ Android target: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
✗ Gradle: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /home/pcmagas/Λήψεις/tools/tools/templates/gradle/wrapper
我也试过了:
export PATH="$PATH:$ANDROID_HOME/bin"
还是没有成功。
编辑 1:
请记住,我已经看过了:
- Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK - Android
- Cordova: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable
还是没有成功。
编辑 2:
我跑:
sdkmanager "build-tools;25.0.3"
现在我得到了唯一的错误:
✗ Gradle: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /home/pcmagas/Λήψεις/SDK/tools/tools/templates/gradle/wrapper
此外,我将ANDROID_HOME 更改为/home/pcmagas/Λήψεις/SDK/tools
并将SDK生成的所有文件夹移至:/home/pcmagas/Λήψεις/SDK/。
【问题讨论】:
标签: android ubuntu meteor android-sdk-tools