我刚开始使用React-Native。我尝试使用npm i React-Native-Maps--Save
在我的应用程序中添加google map
我参考了https://github.com/react-community/react-native-maps/blob/master/docs/installation.md并按照所有步骤操作。我获得Google API并将其放入AndroidManifest。我的Google Play服务版本是14.5.74。我还添加了android/app/build.gradle
。在这儿
ext{
buildToolsVersion=“27.0.3”
minSdkVersion=16
compileSdkVersion=27
targetSdkVersion=26
supportLibVersion=“27.1.1”
googlePlayServicesVersion=“14.5.74”
androidMapsUtilsVersion=“0.5+”}
我曾经
“依赖项”:{
“@Babel/Runtime”:“^7.1.5”,
“React”:“16.5.0”,
“React-Native”:“0.57.0”,
“React-Native-Maps”:“^0.22.1”},
但我有个错误
问:react-native-maps:compiledebugjavawithjavac失败d:_reactnative\msb\locationmap\node_modules\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\airmappolyline.Java:8:错误:找不到符号
import com.google.android.gms.maps.model.cap;^symbol:class Cap location:package com.google.android.gms.maps.model D:_reactnative\msb\locationmap\node_module\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\airmappolyline.Java:12:错误:找不到symbol import com.google.android.gms.maps.model.roundcap;^symbol:class RoundCap location:package.com.google.android.gms.maps.model d:_reactnative\msb\locationmap\node_module\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\airmappolyline.Java:27错误:找不到symbol private Cap lineCap=new RoundCap();^symbol:class Cap location:class AirMapPolyline d:_reactNative\MSB\LocationMap\node_module\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\node_module\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\AirMapPolyline.Java:73:错误:找不到符号public void setLineCap.Cap{roid\react\maps\airmappolylineManager.java:17:错误:找不到符号import com.google.android.gms.maps.model.roundcap;^symbol:类RoundCap位置:包com.google.android.gms.maps.model D:_reactnative\msb\locationmap\node_module\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\airmapolylineManager.Java:18:错误:找不到符号import com.google.android.gms.maps.squarecap;^symbol:class SquareCap location:package com.google.android.gms.maps.model d:_reactnative\msb\locationmap\node_module\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\airmappolyline.Java:27:错误:找不到符号private Cap lineCap=new RoundCap();^symbol:class RoundCap location:class AirMapPolyline d:_reactNative\msb\locationmap\node_modules\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\AirMapPolylineManager.Java:77:错误:找不到符号Cap Cap=null;^symbol:class Cap location:class AirMapPolylineManager d:_reactnative\msb\locationmap\node_modules\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\AirMapPolylineManager.Java:80:错误:找不到symbolcap=new ButtCap();^symbol:class ButtCap location:class AirMapPolylineManager d:_reactnative\msb\locationmap\node_modules\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\AirMapPolylineManager.Java:83:错误:找不到symbolcap=new RoundCap();^symbol:class RoundCap location:class AirMapPolylineManager d:_reactNative\msb\locationmap\node_modules\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\AirMapPolylineManager.Java:86:错误:找不到symbolcap=new SquareCap();^symbol:class SquareCap location:class AirMapPolylineManager d:_reactNative\msb\locationmap\node_modules\react-native-Maps\lib\android\src\main\Java\com\爱彼迎\android\react\maps\AirMapPolylineManager.Java:89:错误:找不到symbolcap=new RoundCap();^Symbol:class RoundCap location:class AirMapPolylineManager注意:某些输入文件使用或重写不推荐使用的API。注意:有关详细信息,请使用-xlint:deprecation重新编译。注意:有些输入文件使用未经检查或不安全的操作。注意:有关详细信息,请使用-xlint:unchecked重新编译。14个错误
>
编译失败;有关详细信息,请参阅编译器错误输出。
请说说怎样才能解决这个问题?
React-Native-Maps
依赖项不适用React-Native version 0.57.0
。请将其更新到0.57.4或最新版本。
当我运行react native run android时,我得到以下错误:;我正在将其设置为在设备上运行。
我构建用于调试的android应用程序,使用
我在编译时没有错误,实际上这是从哪里冒出来的。其他人有这个错误吗? 任务:react-native-webview:compiledebugjavawithjavac注意:/user_data/projects/react-native/populi/node_modules/react-native-webview/android/src/main/java/com/reactnativeCom
我正在React Native 0.59.1上构建一个项目,但当我添加React Native youtube时,我在运行react-native run-android时遇到以下错误
Intellij Ultimate 2020.2 Java 在我启用设置之前,项目状态良好 然后,在运行gradle构建任务时,会出现重复的类错误。这是IDE抱怨的重复类。例如: C: \Users\User\IdeaProjects\Dep\build\generated\sources\annotationProcessor\java\main\test\pot\service\mapper\