ошибка Не удалось разрешить com.android.support:appcompat-v7:27.0.1 при использовании плагина nativescript-contacts - PullRequest
0 голосов
/ 18 декабря 2018

после создания проекта с пустым шаблоном машинописи и добавления плагинов nativescript-contacts и nativescript-permissions, запуск проекта с платформой Android вызывает эти ошибки

F:\AMZONE-F\ProjectMobile\Tally>tns run android --device NioshaAVD
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Starting Android emulator with image NioshaAVD
Waiting for emulator device initialization...
Your application will be deployed only on the device specified by the provided index or identifier.
Executing before-watchPatterns hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-watchPatterns\nativescript-dev-typescript.js
Executing before-watchPatterns hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-watchPatterns\nativescript-dev-webpack.js
Executing before-watch hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-watch\nativescript-dev-typescript.js
Found peer TypeScript 3.1.6
Executing before-watch hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-watch\nativescript-dev-webpack.js
Executing before-shouldPrepare hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-shouldPrepare\nativescript-dev-webpack.js
Executing before-prepare hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-prepare\nativescript-dev-typescript.js
Hook skipped because either bundling or livesync is in progress.
Preparing project...
Executing before-prepareJSApp hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-prepareJSApp\nativescript-dev-webpack.js
Successfully prepared plugin nativescript-contacts for android.
Successfully prepared plugin nativescript-permissions for android.
Successfully prepared plugin nativescript-theme-core for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin tns-core-modules-widgets for android.

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':releaseCompileClasspath'.
> Could not resolve com.android.support:support-v4:27.0.1.
  Required by:
      project :
   > Could not resolve com.android.support:support-v4:27.0.1.
      > Could not get resource 'https://jcenter.bintray.com/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom'.
         > Could not HEAD 'https://jcenter.bintray.com/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom'.
            > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/159.122.18.156] failed: Connection timed out: connect
> Could not resolve com.android.support:appcompat-v7:27.0.1.
  Required by:
      project :
   > Could not resolve com.android.support:appcompat-v7:27.0.1.
      > Could not get resource 'https://jcenter.bintray.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom'.
         > Could not HEAD 'https://jcenter.bintray.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom'.            > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/159.122.18.156] failed: Connection timed out: connect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 2s
Unable to apply changes on device: emulator-5554. Error is: Failed to build plugin nativescript-contacts :
Error: Command gradlew.bat failed with exit code 1.
Executing after-watch hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\after-watch\nativescript-dev-typescript.js
Stopping tsc watch
Executing after-watch hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\after-watch\nativescript-dev-webpack.js
Stopping webpack watch
Executing after-watch hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\after-watch\nativescript-dev-typescript.js
Executing after-watch hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\after-watch\nativescript-dev-webpack.js
Stopping webpack watch

F:\AMZONE-F\ProjectMobile\Tally>tns run android --device NioshaAVD
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Starting Android emulator with image NioshaAVD
Waiting for emulator device initialization...
Your application will be deployed only on the device specified by the provided index or identifier.
Executing before-watchPatterns hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-watchPatterns\nativescript-dev-typescript.js
Executing before-watchPatterns hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-watchPatterns\nativescript-dev-webpack.js
Executing before-watch hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-watch\nativescript-dev-typescript.js
Found peer TypeScript 3.1.6
Executing before-watch hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-watch\nativescript-dev-webpack.js
Executing before-shouldPrepare hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-shouldPrepare\nativescript-dev-webpack.js
Executing before-prepare hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-prepare\nativescript-dev-typescript.js
Hook skipped because either bundling or livesync is in progress.
Preparing project...
Executing before-prepareJSApp hook from F:\AMZONE-F\ProjectMobile\Tally\hooks\before-prepareJSApp\nativescript-dev-webpack.js
Successfully prepared plugin nativescript-contacts for android.
Successfully prepared plugin nativescript-permissions for android.
Successfully prepared plugin nativescript-theme-core for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin tns-core-modules-widgets for android.

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':releaseCompileClasspath'.
> Could not find com.android.support:support-v4:27.0.1.
  Searched in the following locations:
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
    - file:/C:/Users/Mehdizadeh-PC/.m2/repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
    - file:/C:/Users/Mehdizadeh-PC/.m2/repository/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
    - https://repo.maven.apache.org/maven2/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
    - https://repo.maven.apache.org/maven2/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
    - https://maven.google.com/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
    - https://maven.google.com/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
    - https://jcenter.bintray.com/com/android/support/support-v4/27.0.1/support-v4-27.0.1.pom
    - https://jcenter.bintray.com/com/android/support/support-v4/27.0.1/support-v4-27.0.1.jar
  Required by:
      project :
> Could not find com.android.support:appcompat-v7:27.0.1.
  Searched in the following locations:
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
    - file:/C:/Users/Mehdizadeh-PC/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
    - file:/C:/Users/Mehdizadeh-PC/.m2/repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
    - file:/C:/Users/Mehdizadeh-PC/.m2/repository/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
    - https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
    - https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
    - https://maven.google.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
    - https://maven.google.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
    - https://jcenter.bintray.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.pom
    - https://jcenter.bintray.com/com/android/support/appcompat-v7/27.0.1/appcompat-v7-27.0.1.jar
  Required by:
      project :

я добавил это в зависимости, плагин Permisssion был, ноконтакты нет!

 {
        "name": "nativescript-contacts",
        "directory": "..\\..\\node_modules\\nativescript-contacts"
    }

также я добавил это в build.gradle

allprojects {
    repositories {
        google()
        jcenter()
         maven {
            url "https://maven.google.com"
        }
    }
      dependencies {
     implementation "com.android.support:support-v4:27.0.1"
      }
}

также я загрузил support-v4 и файл поддержки compat и поместил их вручную по пути, указанному в моей системебыло упомянуто в журнале ошибок в найденных местах и ​​изменено

 maven {
                url "https://maven.google.com"
            }

на

 mavenlocal()

, также я изменил sdktargetversion на 27, в то время как minversion был 17

, но я все еще получаю этиошибки, которые я не могу разрешить, свяжитесь с плагином

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...