升级以响应本机0.59.3

时间:2019-04-03 10:38:55

标签: android react-native gradle react-native-maps

最近已升级以响应本机v0.59.3 并且正在使用react-native-google-places和react-native地图包的最新版本。

当我尝试使用react-native运行android时,出现compileDebugResources渲染脚本错误,为此我在依赖项的节点模块的buid.gradle进行了一些修改以解决该问题。

现在,当我收到错误消息时,我无法生成签名的APK

无法捕获任务':app:bundleReleaseJsAndAssets'属性'$ 1'的输入文件的指纹

我必须为此删除节点模块并重新安装,从而导致

compileDebugRenderscript错误。

有什么建议或解决方案吗?

以下是我对node_modules中的googleplaces和google map的build.gradle所做的更改

更改节点模块/react-native-maps/lib/android/build.gradle

dependencies {
  def googlePlayServicesVersion = safeExtGet('googlePlayServicesVersion', DEFAULT_GOOGLE_PLAY_SERVICES_VERSION)
  // Variable lookup order : googlePlayServicesMapsVersion > googlePlayServicesVersion > DEFAULT_GOOGLE_PLAY_SERVICES_MAPS_VERSION
  def googlePlayServicesMapsVersion = safeExtGet('googlePlayServicesMapsVersion', safeExtGet('googlePlayServicesVersion', DEFAULT_GOOGLE_PLAY_SERVICES_MAPS_VERSION))
  def androidMapsUtilsVersion = safeExtGet('androidMapsUtilsVersion', DEFAULT_ANDROID_MAPS_UTILS_VERSION)

  compileOnly "com.facebook.react:react-native:+"
  implementation "com.google.android.gms:play-services-base:$googlePlayServicesVersion"
  implementation "com.google.android.gms:play-services-maps:$googlePlayServicesMapsVersion"
  implementation "com.google.maps.android:android-maps-utils:$androidMapsUtilsVersion"

  implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
}


In google places node modules build.gradle 
Add 
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

And 
android {
    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
    }
}

0 个答案:

没有答案