在phonegap构建中如果我正在使用onesignal-cordova-plugin和cordova-plugin-googlemaps而构建时显示错误

时间:2018-06-07 11:04:59

标签: cordova cordova-plugins phonegap-plugins phonegap-build onesignal

在phonegap构建中,如果我在构建时使用的是someignal-cordova-plugin和cordova-plugin-googlemaps,则会显示规范错误

<gap:plugin name="onesignal-cordova-plugin"         source="npm"    spec="2.4.0" />
<plugin name="cordova-plugin-googlemaps" source="npm" spec="2.3.6">
    <variable name="API_KEY_FOR_ANDROID" value="API_KEY" />
</plugin> 

ERROR:

:app:compileDebugJavaWithJavac/app/src/main/java/plugin/google/maps/PluginStreetViewPanorama.java:17: error: cannot find symbol
import com.google.android.gms.maps.model.StreetViewSource;
                                        ^
  symbol:   class StreetViewSource
  location: package com.google.android.gms.maps.model
/app/src/main/java/plugin/google/maps/PluginStreetViewPanorama.java:87: error: cannot find symbol
          StreetViewSource source = "OUTDOOR".equals(cameraOpts.getString("source")) ?
          ^
  symbol:   class StreetViewSource
  location: class PluginStreetViewPanorama
/app/src/main/java/plugin/google/maps/PluginStreetViewPanorama.java:88: error: cannot find symbol
              StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
              ^
  symbol:   variable StreetViewSource
  location: class PluginStreetViewPanorama
/app/src/main/java/plugin/google/maps/PluginStreetViewPanorama.java:88: error: cannot find symbol
              StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
                                         ^
  symbol:   variable StreetViewSource
  location: class PluginStreetViewPanorama
/app/src/main/java/plugin/google/maps/PluginStreetViewPanorama.java:280: error: cannot find symbol
              StreetViewSource source = "OUTDOOR".equals(cameraOpts.getString("source")) ?
              ^
  symbol: class StreetViewSource
/app/src/main/java/plugin/google/maps/PluginStreetViewPanorama.java:281: error: cannot find symbol
                  StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
                  ^
  symbol: variable StreetViewSource
/app/src/main/java/plugin/google/maps/PluginStreetViewPanorama.java:281: error: cannot find symbol
                  StreetViewSource.OUTDOOR : StreetViewSource.DEFAULT;
                                             ^
  symbol: variable StreetViewSource
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.
7 errors
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

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

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

BUILD FAILED in 17s
27 actionable tasks: 27 executed
Error: /gradlew: Command failed with exit code 1 Error output:

如果我将我的cordova-plugin-googlemaps规范更改为spec =&#34; 2.2.9&#34;它的工作,但我需要大于2.2.9的cordova-plugin-googlemaps规范, 有没有办法克服这个问题。

0 个答案:

没有答案