0
我正在使用Gradle 2.13并尝试在readhat中构建Android apk并且系统没有Internet访问权限。 我正在尝试构建Android离线版。但是它抛出了一些异常,无法弄清楚出了什么问题。使用Gradle在离线模式下在Redhat中构建Android APK
主要的build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
错误:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'PROJECT'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:2.1.0.
Required by:
:PROJECT:unspecified
> No cached version of com.android.tools.build:gradle:2.1.0 available for offline mode.
> No cached version of com.android.tools.build:gradle:2.1.0 available for offline mode.
* 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: 0.831 secs
版本:
gradle -version
Gradle 2.13
是否有可用的任何教程构建在redhat/linux下的离线APK机?
编辑:更新问题。
谢谢加布里埃莱,我会尝试。 它会影响正常的android studio构建? 我正在签出Linux环境中的代码并进行构建。 我能否将distributionURL指向本地路径? –
不能正常工作:( –
@MadhukarHebbar当然,您不能更改该插件的离线工作方式,您至少需要连接一次。 –