1
'ionic build android'コマンドを実行する際に問題が発生しましたが、解決できません。以前はionicコマンド 'platform android add'を実行していました。イオンアプリケーションでビルドを実行しようとしたときに例外が発生する
D:\ionic\hello>ionic build android
Running command: "C:\Program Files (x86)\nodejs\node.exe" D:\ionic\hello\hooks\a
fter_prepare\010_add_platform_class.js D:\ionic\hello
add to body class: platform-android
ANDROID_HOME=C:\android-sdk-win
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_65
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.2.3.
Required by:
:android:unspecified
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gr
adle/1.2.3/gradle-1.2.3.pom'.
> peer not authenticated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 1.585 secs
Error: Error code 1 for command: cmd with args: /s,/c,"D:\ionic\hello\platforms\
android\gradlew cdvBuildDebug -b D:\ionic\hello\platforms\android\build.gradle -
Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
アンドロイドデバイスでテストを実行するには、パッケージを生成する必要があります。 私のbuild.gradleは以下のとおりです。
apply plugin: 'android'
buildscript {
repositories {
mavenCentral()
}
// Switch the Android Gradle plugin version requirement depending on the
// installed version of Gradle. This dependency is documented at
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
// and https://issues.apache.org/jira/browse/CB-8143
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
// Allow plugins to declare Maven dependencies via build-extras.gradle.
repositories {
mavenCentral()
}
task wrapper(type: Wrapper) {
gradleVersion = '2.8'
}
...
どうすれば解決できますか?
うーん、ないように注意してくださいしかし、必ずビルドツールは、あなたが今までにされていることを確認し、また作る:
は、あなたのGradleがあなたのCにファイルであってもよいです「エクストラ」がインストールされていることを確認してください。あなたがインターネットに接続していることを確認してください:) --stacktraceフラグを付けて実行し、出力をポストしてください。 – iCediCe
ありがとう@iCediCe、ルートフォルダのjre/jdk内で証明書を使用していたため、何もダウンロードできませんでした。 – phdias
問題はありません。あなたが仕事にしたと聞いてよかったです。 – iCediCe