NativeScript - 构建项目时出错

时间:2017-10-22 20:28:33

标签: android nativescript

好吧,我刚刚安装了插件nativescript-geolocationnativescript-google-maps-sdk,但它说我需要更新我的Google Play服务。

所以我只需要将它添加到我的app.gradle:

project.ext {
    googlePlayServicesVersion = "11.2.+"
  }

所以我做到了。

我还在Android Studio上更新了我的Google Repository。

当我跑步时: tns run android

我收到此错误:

C:\Sistema-3E-Front-end>tns run android
Searching for devices...
Executing before-liveSync hook from C:\Sistema-3E-Front-end\hooks\before-liveSync\nativescript-angular-sync.js
Executing before-prepare hook from C:\Sistema-3E-Front-end\hooks\before-prepare\nativescript-dev-typescript.js
Found peer TypeScript 2.4.2
Preparing project...
Project successfully prepared (Android)
Building project...
Gradle build...

 :config phase:  createDefaultIncludeFiles
        +found plugins: nativescript-background-http
        +found plugins: nativescript-geolocation
        +found plugins: nativescript-google-maps-sdk
        +found plugins: nativescript-imagepicker
        +found plugins: nativescript-pro-ui
        +found plugins: tns-core-modules-widgets

:config phase:  createPluginsConfigFile
         Creating product flavors include.gradle file in C:\Sistema-3E-Front-end\platforms\android/configurations folder...

:config phase:  pluginExtend
        +applying configuration from: C:\Sistema-3E-Front-end\platforms\android\configurations\include.gradle
        +applying configuration from: C:\Sistema-3E-Front-end\platforms\android\configurations\nativescript-background-http\include.gradle
        +applying configuration from: C:\Sistema-3E-Front-end\platforms\android\configurations\nativescript-geolocation\include.gradle
        +applying configuration from: C:\Sistema-3E-Front-end\platforms\android\configurations\nativescript-google-maps-sdk\include.gradle
        +applying configuration from: C:\Sistema-3E-Front-end\platforms\android\configurations\nativescript-imagepicker\include.gradle
        +applying configuration from: C:\Sistema-3E-Front-end\platforms\android\configurations\nativescript-pro-ui\include.gradle
        +applying configuration from: C:\Sistema-3E-Front-end\platforms\android\configurations\tns-core-modules-widgets\include.gradle

 :config phase:  addAarDependencies
        +adding dependency: C:\Sistema-3E-Front-end\platforms\android\libs\aar\Chart-2017.1.1003-dev-release.aar
        +adding dependency: C:\Sistema-3E-Front-end\platforms\android\libs\aar\Common-2017.1.1003-dev-release.aar
        +adding dependency: C:\Sistema-3E-Front-end\platforms\android\libs\aar\Data-2017.1.1003-dev-release.aar
        +adding dependency: C:\Sistema-3E-Front-end\platforms\android\libs\aar\Feedback-2017.1.1003-dev-release.aar
        +adding dependency: C:\Sistema-3E-Front-end\platforms\android\libs\aar\Gauges-2017.1.1003-dev-release.aar
        +adding dependency: C:\Sistema-3E-Front-end\platforms\android\libs\aar\Input-2017.1.1003-dev-release.aar
        +adding dependency: C:\Sistema-3E-Front-end\platforms\android\libs\aar\List-2017.1.1003-dev-release.aar
        +adding dependency: C:\Sistema-3E-Front-end\platforms\android\libs\aar\Primitives-2017.1.1003-dev-release.aar
        +adding dependency: C:\Sistema-3E-Front-end\platforms\android\libs\aar\widgets-release.aar
Running full build
finished with reading lines with js files
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Exception in thread "main" java.lang.IllegalArgumentException: Class com.google.android.gms.common.internal.zzae conflict: C:\Sistema-3E-Front-end\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\11.2.2\jars\classes.jar and C:\Sistema-3E-Front-end\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\11.0.0\jars\classes.jar
        at com.telerik.metadata.ClassRepo.addToCache(ClassRepo.java:21)
        at com.telerik.metadata.Builder.build(Builder.java:38)
        at com.telerik.metadata.Generator.main(Generator.java:44)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildMetadata'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_91\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1.
Executing after-watch hook from C:\Sistema-3E-Front-end\hooks\after-watch\nativescript-dev-typescript.js

0 个答案:

没有答案