【发布时间】:2016-01-19 00:58:51
【问题描述】:
我正在尝试将我的测试流星应用程序运行到我的设备中,但是当我尝试上传它时,控制台会输出以下错误。
~ meteor run android-device --mobile-server mytest.meteor.com
[[[[[ ~/projects/simple-todos ]]]]]
=> Started proxy.
=> Started MongoDB.
WARNING: You are testing your app on a remote device. For the mobile app to be able to connect to the local server, make sure your device is on the same network, and that the network configuration allows clients to talk to each other (no
client isolation).
=> Started your app.
=> App running at: http://localhost:3000/
=> Errors executing Cordova commands:
While running Cordova app for platform Android with options --device:
Error: Command failed: /home/dbugger/projects/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/run --device
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:1.0.0+.
Required by:
:android:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml.
> Failure initializing default system SSL context
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
/home/dbugger/projects/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /home/dbugger/projects/simple-todos/.meteor/local/cordova-build/platforms/android/gradlew with args:
cdvBuildDebug,-b,/home/dbugger/projects/simple-todos/.meteor/local/cordova-build/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true
at ChildProcess.exitCallback (/tools/utils/processes.js:137:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
ExitWithCode:1
我不确定我做错了什么。正如输出告诉我的那样,我什至无法将--stacktrace 标志添加到命令中。
我错过了什么?
更新:以防万一,我使用的是 Ubuntu
更新 2:我在我的系统上安装了证书,但现在又出现了一个错误!
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:1.0.0+.
Required by:
:android:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml.
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml'.
> peer not authenticated
【问题讨论】:
-
我在笔记本电脑上遇到了同样的问题(台式机很好)。我认为
Failure initializing default system SSL context是其中的关键,但还没有更进一步。 -
我将
/etc/ssl/certs/java/cacerts从我的台式机复制到我的笔记本电脑,现在可以在两个系统上构建。 -
那个文件夹对我来说是空的......我不知道这是否重要......但每次我打开 Android Studios 我都会收到一条消息,告诉我 Google 证书不受信任......也许我的文件夹有权限问题?!?!?!
-
sudo apt-get install ca-certificates-java -
通常这与 java 安装捆绑在一起。可能最好重新安装java。