Error:Failed to find: com.google.protobuf:protobuf-java:2.5 in Android Studio imported project

Error:Failed to find: com.google.protobuf:protobuf-java:2.5 in Android Studio imported project

我在 Android Studio 中导入了一个现有的 Android 项目,但它没有构建,因此:

Error:A problem occurred configuring project ':appName'.
> A problem occurred configuring project ':myTracksLib'.
   > Could not resolve all dependencies for configuration ':myTracksLib:_debugCompile'.
      > Could not find com.google.protobuf:protobuf-java:2.5.
        Searched in the following locations:
            https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5/protobuf-java-2.5.pom
            https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5/protobuf-java-2.5.jar
            file:/Users/name/Library/Android/sdk/extras/android/m2repository/com/google/protobuf/protobuf-java/2.5/protobuf-java-2.5.pom
            file:/Users/name/Library/Android/sdk/extras/android/m2repository/com/google/protobuf/protobuf-java/2.5/protobuf-java-2.5.jar
            file:/Users/name/Library/Android/sdk/extras/google/m2repository/com/google/protobuf/protobuf-java/2.5/protobuf-java-2.5.pom
            file:/Users/name/Library/Android/sdk/extras/google/m2repository/com/google/protobuf/protobuf-java/2.5/protobuf-java-2.5.jar
        Required by:
            AppName:myTracksLib:unspecified

我该如何解决?项目在 Eclipse 中构建,所以我不知道为什么会这样。

我看过 this 但我不知道它与 Android Studio 有什么关系。

根据Maven Central的搜索功能:

http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.google.protobuf%22%20AND%20a%3A%22protobuf-java%22

有 2.5.0 版本,不是 2.5。尝试将构建脚本中的版本更改为 2.5.0。