简体   繁体   中英

How to create offline Android apps development environment

I'm trying to create my android apps development environment. Now already installed the Android Studio(with SDK) and JDK. but when I'm trying to create my first apps, the Android studio is trying to get several dependencies from website. I don't have internet connection on the development PC, is there any way to download the dependencies to local and setup an offline enviroment?

below are the error messages while I'm trying to build my first project. A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugAndroidTestApkCopy'. Could not resolve com.squareup:javawriter:2.1.1. Required by: MyApplication2:app:unspecified > com.android.support.test.espresso:espresso-core:2.2.2 Could not resolve com.squareup:javawriter:2.1.1. Could not get resource ' https://jcenter.bintray.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1.pom '. Could not GET ' https://jcenter.bintray.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1.pom '.

You can copy those dependencies to your .m2 directory and refer to that directory using below repositories { mavenLocal() }

and set gradle to offline mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM