Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Vongolatt opened this issue Sep 5, 2018 · 4 comments
Open

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

Vongolatt opened this issue Sep 5, 2018 · 4 comments

Comments

@Vongolatt
Copy link

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

@2534290808
Copy link
Member

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

@MaZchao
Copy link

MaZchao commented Nov 28, 2018

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

现在用的react-native 0.57+新建项目后用的gradle 4.4com.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,可以不加这行
}

@Sam1141968878
Copy link

请问是反应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的版本使用了这个库之后打包会报错吗,我这里报错了,需要怎么配置呀

@ShawnLingTest
Copy link

我的也是 报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants