Не удалось найти support-v13.jar форму maven.aliyun.com - PullRequest
0 голосов
/ 14 декабря 2018

Среда для разработчиков:

  • ubuntu18.04 64,
  • Android Studio 3.14

, когда я git clone git@github.com:google/search-samples.git, тогда я открываю приложение-индексацию-начать проект, синхронизировать .... возникла проблема:

Could not find support-v13.jar (com.android.support:support-v13:23.3.0).
Searched in the following locations:
    http://maven.aliyun.com/nexus/content/repositories/jcenter/com/android/support/support-v13/23.3.0/support-v13-23.3.0.jar

Please install the Android Support Repository from the Android SDK Manager.

Открыть Android SDK Manager

/etc/apt/sources.list:

deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted #Added by software-properties

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse universe #Added by software-properties
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main multiverse universe restricted #Added by software-properties
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse #Added by software-properties
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://us.archive.ubuntu.com/ubuntu/ bionic-security main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-security main multiverse universe restricted #Added by software-properties
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb https://typora.io/linux ./
# deb-src https://typora.io/linux ./
# deb-src https://typora.io/linux ./
# deb-src https://typora.io/linux ./
deb https://download.sublimetext.com/ apt/stable/
# deb-src https://download.sublimetext.com/ apt/stable/

Ответы [ 2 ]

0 голосов
/ 14 декабря 2018

Я уже сталкивался с подобной проблемой раньше. Может быть, ваш файл build.gradle выглядит следующим образом:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        flatDir
        {
            dirs 'libs'
        }
        google()
        mavenLocal()
        maven {
            url "http://mvnrepo.alibaba-inc.com/mvn/repository"
        }
        maven {
            url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
        }
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Когда вы запускаете ссылку на проект с частного пульта, это делает проблемуВы сказали! , иногда, когда вы получаете проект от Alibaba Inc или у проекта есть личная ссылка с удаленного компьютера, возникает проблема.

enter image description here

Просто сделайте это так, чтобы проект создавался с помощью библиотеки поддержки Android из обычного канала, а не из частного хранилища Alibaba.

//        maven {
//            url "http://mvnrepo.alibaba-inc.com/mvn/repository"
//        }
//        maven {
//            url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
//        }
0 голосов
/ 14 декабря 2018

Вам необходимо обновить версию AGP как минимум до 3.0.0.Но лучше последняя версия 3.2.1.Например, для TOP LEVEL build.gradle

// Top-level build file where you can add configuration options 
common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.google.gms:google-services:4.2.0'
        classpath 'com.android.tools.build:gradle:3.2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

gradle-wrapper.properties изменить на ниже

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...