安卓/ Java的echonest文件上传errorrr [英] Android /java echonest file upload errorrr
问题描述
所以,我一直在试图找出如何上传以供分析echonest服务器上的文件,但我无法,居然没有任何反应后:轨道轨道= echoNest.uploadTrack(文件,真);
字串[] args = {/存储/ sdcard1 /音乐/驱动器配乐/一个真正的英雄(技艺电器青年。).MP3};
档案文件=新的文件(参数[0]);
如果(!file.canRead())
{
printUsage();
的System.out.println(插入一个有效的路径!);
}
的System.out.println(validd路径!);
EchoNestAPI echoNest =新EchoNestAPI(080NXJV4Y ......);
的System.out.println(你好!);
轨道轨道= echoNest.uploadTrack(文件,真正的);
的System.out.println(已上传!);
track.waitForAnalysis((60 * 1000)/ 2);
的System.out.println(ID:+ track.getID());
的System.out.println(艺术家+ track.getArtistName());
的System.out.println(标题:+ track.getTitle());
我碰到类似的问题,而搜索在互联网上,但我也没有碰到过一个解决方案。
<一个href="http://archive-com.com/page/3694036/2014-02-11/http://developer.echonest.com/forums/thread/365" rel="nofollow">http://archive-com.com/page/3694036/2014-02-11/http://developer.echonest.com/forums/thread/365
http://developer1072.rssing.com/chan-22893681/all_p31。 HTML#item617
http://developer.echonest.com/forums/thread/1624
下面是我收到的错误
二月八日至17日:27:28.555:我/的System.out(2776):EchoNestAPI错误:的java.net.UnknownHostException:无法解析主机developer.echonest.com :没有地址与主机名CMD相关: http://developer.echonest.com/api/v4/track/profile?md5=2fff2dc89742ea6aadf89a96590a2174&api_key=080NXJV4YHVLIVBFA
2月8号至17日:27:28.555:我/的System.out(2776):EchoNestAPI重试失败CMD: http://developer.echonest.com/api/v4/track/profile?md5=2fff2dc89742ea6aadf89a96590a2174&api_key=080NXJV4YHVLIVBFA
看来,你的API密钥是无效的,你的罐子进口量互相冲突。你必须确保你正在一个的AsyncTask
里面那个电话。在那之后,一切都将工作正常。
So i had been trying to figure out how to upload the file on echonest servers for analysis but i am unable to,actually nothing happens after :Track track = echoNest.uploadTrack(file,true);
String[] args={"/storage/sdcard1/Music/Drive soundtrack/A Real Hero (feat. Electric Youth).mp3"};
File file = new File(args[0]);
if(!file.canRead())
{
printUsage();
System.out.println("Insert a valid path!");
}
System.out.println("validd path!");
EchoNestAPI echoNest = new EchoNestAPI("080NXJV4Y....");
System.out.println("hello!");
Track track = echoNest.uploadTrack(file,true);
System.out.println("uploaded!");
track.waitForAnalysis((60*1000)/2);
System.out.println("ID: "+track.getID());
System.out.println("Artist: "+track.getArtistName());
System.out.println("Title: "+track.getTitle());
I came across similar problems while searching over the internet but i couldn't come across a solution.
http://archive-com.com/page/3694036/2014-02-11/http://developer.echonest.com/forums/thread/365
http://developer1072.rssing.com/chan-22893681/all_p31.html#item617
http://developer.echonest.com/forums/thread/1624
here is the error I am receiving
08-17 02:27:28.555: I/System.out(2776): EchoNestAPI Error: java.net.UnknownHostException: Unable to resolve host "developer.echonest.com": No address associated with hostname cmd: http://developer.echonest.com/api/v4/track/profile?md5=2fff2dc89742ea6aadf89a96590a2174&api_key=080NXJV4YHVLIVBFA
08-17 02:27:28.555: I/System.out(2776): EchoNestAPI retry failure cmd: http://developer.echonest.com/api/v4/track/profile?md5=2fff2dc89742ea6aadf89a96590a2174&api_key=080NXJV4YHVLIVBFA
It appears that your api key was invalid and your jar imports were conflicting with each other. You have to make sure you are making that call inside an AsyncTask
. After that, all is going to work ok.
这篇关于安卓/ Java的echonest文件上传errorrr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!