Android cannot find the method requestPermissions (MainActivity,String [], int))

when applying for permission,
Error: (29427) error: cannot find symbol
symbol: method requestPermissions (MainActivity,String [], int)
location: class ActivityCompat
after checking, it may be a problem with v4 package. I tried to modify the compiled version of gradle, but it didn"t work.
Code:
private void checkPermissions (String [] needPermissions) {

    //
    List<String> needRequestPermissonList = findDeniedPermissions(needPermissions);
    if (null != needRequestPermissonList
            && needRequestPermissonList.size() > 0) {
        //list.toarray
        ActivityCompat.requestPermissions(this, needRequestPermissonList.toArray(new String[needRequestPermissonList.size()]),
                PERMISSON_REQUESTCODE);
    }
}

dependency section of gradle:
dependencies {

    implementation fileTree(include: ["*.jar"], dir: "libs")
    //noinspection GradleCompatible
    implementation "com.android.support:appcompat-v7:26.0.0-beta1"
    implementation "com.android.support.constraint:constraint-layout:1.0.2"
    testImplementation "junit:junit:4.12"
    androidTestImplementation "com.android.support.test:runner:0.5"
    androidTestImplementation "com.android.support.test.espresso:espresso-core:2.2.2"
    compile "com.android.support:recyclerview-v7:26.0.0-alpha1"
    compile "com.squareup.okhttp:okhttp:2.7.5"
    compile "com.google.code.gson:gson:2.2.4"
    compile "com.squareup.okhttp3:okhttp:3.4.2"
    compile "com.zhy:autolayout:1.4.5"
    compile "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+"
    compile "com.youth.banner:banner:1.4.10"
    compile "org.greenrobot:eventbus:3.1.1"
    compile "com.github.bumptech.glide:glide:3.7.0"
    compile "com.github.PhilJay:MPAndroidChart:v3.0.0-beta1"
    compile "com.aliyun.dpa:oss-android-sdk:2.8.0"
    compile "com.lzy.widget:imagepicker:0.6.1"
    compile "com.xingliuhua:xlhratingbar_lib:1.0.1"
    compile "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+"
    compile "com.kyleduo.switchbutton:library:1.4.4"
    compile "org.quanqi:CircularProgress:1.0.2"
    compile "com.zhy:okhttputils:2.6.2"
    compile "cn.aigestudio.wheelpicker:WheelPicker:1.1.2"
}

what should I do now to avoid this problem?

Mar.22,2021

add the following code to gradle
configurations.all {

    resolutionStrategy {
        force 'com.android.support:support-v4:27.1.1'
    }
}
The purpose of

is to force the use of this version of the package to solve


I have a conflict because the v7 package in gradle is duplicated with the v4 package in libs. Just delete it. (PS:v7 contains v4)
reference: http://www.manew.com/blog-166.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3eaae-e980.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3eaae-e980.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?