2015-10-20 49 views
1

我試圖將我的測試meteor應用程序運行到我的設備中,但是當我嘗試上載它時,控制檯輸出以下錯誤。流星:試圖在我的設備上運行我的應用程序給出依賴性錯誤

~ 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標誌添加到命令中。

我錯過了什麼?

UPDATE:在它的事項的情況下,我使用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 
+1

我在筆記本電腦上有同樣的問題(桌面很好)。我認爲['初始化默認系統SSL上下文失敗](https://discuss.gradle.org/t/failure-initializing-default-system-ssl-context/6568)是它的關鍵,但並沒有消失任何進一步。 – JeremyK

+0

我從桌面上將'/ etc/ssl/certs/java/cacerts'複製到我的筆記本電腦上,現在可以在兩個系統上構建。 – JeremyK

+0

該文件夾對我來說是空的....我不知道這是否很重要...但每次我打開Android Studios時,我都會收到一條消息,告訴我Google證書不受信任...也許我有一些權限問題文件夾?!?!?! –

回答

2

我有同樣的問題。我不知道爲什麼這個工作,但它確實。只需發出以下命令:

sudo update-ca-certificates -f 
+1

哇,在嘗試了幾十個複雜的解決方案後,這就是解決問題的方法 – guinunez

相關問題