Skip to content

android sdk版本与库版本不兼容 #22

Open

Description

@Vongolatt

修改库的版本
compileSdkVersion 26 buildToolsVersion "26.0.2"
可以修复这个问题

Activity

  1. 2534290808 commented on Sep 13, 2018

    @2534290808
    Member

    请问是react native的那个版本啊?

  2. MaZchao commented on Nov 28, 2018

    @MaZchao

    请问是react native的那个版本啊?

    现在用的react-native 0.57+新建项目后用的gradle 4.4和com.android.tools.build:gradle:3.1.4

    需要修改build.gradle如下,不然会报错

    android {
        compileSdkVersion 26 // 从25改为26
        ......
    }
    
    // 需要将dependencies里面的compile改为implemention
    dependencies {
        implementation "com.facebook.react:react-native:+"
        implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.5.1'
        implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.0.5.1'  // 没有使用特殊Header,可以不加这行
    }
  3. Sam1141968878 commented on Dec 26, 2018

    @Sam1141968878

    请问是反应native的那个版本啊?

    用现在的react-native 0.57+新建项目后用的gradle 4.4状语从句:com.android.tools.build:gradle:3.1.4

    修改需要build.gradle如下,不然会报错

    android {
        compileSdkVersion 26  //从25改为26 
        ......
    }
    
    //需要将依赖性里面的编译改为实现
    依赖 {
        实施“ com.facebook.react:反应天然:+ ” 
        执行' com.scwang.smartrefresh:SmartRefreshLayout:1.0.5.1 ' 
        执行' com.scwang.smartrefresh:SmartRefreshHeader:1.0.5.1 '   //没有使用特殊表头,可以不加这行 
    }
    

    你0.57的版本使用了这个库之后打包会报错吗,我这里报错了,需要怎么配置呀

  4. lwcrafts commented on Dec 26, 2018

    @lwcrafts

    我的也是 报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions