Hello!

I installed Android Studio on a machine where there is no Internet (there is no possibility to update the code via the SDK Manager)

Created a new project and ... all classes highlighted in red. Error messages look like this:

cannot resolve symbol "AppCompatActivity" 

File->InvalidateCahces and Build->Clean Project do not help.

in dependencies costs:

 compile "com.android.support:appcompat-v7:23.1.1" 

how to solve a problem?

Thank you.

  • one
    Did build.gradle have you synchronized after adding the appcompat dependency? - Werder
  • @Werder, no Grable project sync failed... - ravend
  • then the BORSHEVIK answer is just for you - Werder

1 answer 1

"Installed Android Studio on a machine where there is no Internet" Obviously, you need to connect the Internet, because the line compile "com.android.support:appcompat-v7:23.1.1" hicorite Gradle, so that he downloaded this library and compiled, and how do you going to do if there is no internet. You can decide otherwise, you download AppCompact libu somewhere and add it to your project as a library, i.e. import not through gradle, but as a file, so that it can be seen as a project, then add a line like this compile project(":Имя вашего проекта-библиотеки") in gradle

  • is there a separate repository where you can download this lib without the sdk manager as a file? - ravend
  • It seems found github.com/koush/android-support-v7-appcompat/tree/master/libs , how to connect it? - ravend
  • @ravend Download the Jar file you need, then in Android Strudio (I have version 1.4) File-> New-> New Module-> Import .JAR / .AAR Package, then in File name you need to specify the path to the .JAR file, if after selecting the Jar file, the Subproject name field will not be filled, then fill it with any name to your taste - BORSHEVIK
  • @ravend google libraries are not on the githaba - all that is there, some kind of fork. They are in the Maven / JCenter repositories and on Google’s own servers. - pavlofff
  • @pavlofff, is it possible to export this library from another machine (where is the Internet), if so how to do it? - ravend