Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从游标中获取Android中的专辑艺术家,而不是返回专辑中的第一个艺术家?_Android_Android Studio - Fatal编程技术网

如何从游标中获取Android中的专辑艺术家,而不是返回专辑中的第一个艺术家?

如何从游标中获取Android中的专辑艺术家,而不是返回专辑中的第一个艺术家?,android,android-studio,Android,Android Studio,目前,我正在使用: int-albumArtistColumn=musicCursor.getColumnIndex(MediaStore.Audio.Albums.ARTIST); 然后,使用以下命令在do/while循环中访问它: do{ String thisAlbumArtist=musicCursor.getString(AlbumArtist列); } while(musicCursor.moveToNext()); 然而,这给了我专辑中的艺术家的名字,而不是专辑的制作人(专辑艺

目前,我正在使用:

int-albumArtistColumn=musicCursor.getColumnIndex(MediaStore.Audio.Albums.ARTIST);
然后,使用以下命令在do/while循环中访问它:

do{
String thisAlbumArtist=musicCursor.getString(AlbumArtist列);
}
while(musicCursor.moveToNext());
然而,这给了我专辑中的艺术家的名字,而不是专辑的制作人(专辑艺术家)。我做错什么了吗?谢谢