An error occurred when android studio imported the ijkplayer source code example

Recently, I am studying the source code of ijkplayer. The example of changing the source code often cannot be used. I delete the source code and compile it many times. By the way, I will record it.

Version android studio3.0.1

Error:A problem occurred configuring project ':ijkplayer-example'.

> All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html

I checked on the Internet, just add flavorDimensions in the defaultConfig of ijkplayer-example's build.gradle

defaultConfig {
    applicationId "tv.danmaku.ijk.media.example"
    minSdkVersion 9
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode rootProject.ext.versionCode
    versionName rootProject.ext.versionName
    flavorDimensions "800400"
}
The latter value is preferably the same as the version, and the version number is in build.gradle under ijkplayer

ext {
    compileSdkVersion = 26
    buildToolsVersion = "26.0.2"
targetSdkVersion = 26
versionCode = 800400
versionName = "0.8.4"
}
    
        
Error:error: '@@array/pref_entries_player' is incompatible with attribute android:entries (attr) reference.

For this error, just find the location of this code, delete an @, change it to @array/pref_entries_player and restart android studio, because make project is useless and can only be restarted



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325676159&siteId=291194637