0

所以谷歌音乐没有官方的api,但有非官方的。因为它是非官方的,所以我们必须使用 ClientLogin 而不是 OAuth,我遇到以下问题

URL url = 新 URL(" https://www.google.com/accounts/ClientLogin ");

HttpURLConnection 连接 = (HttpURLConnection)url.openConnection();

我深深地得到了一个 NumberFormatException 。有什么想法吗?

这是堆栈跟踪

Integer.parseInt(String, int) line: not available   
Integer.<init>(String) line: not available  
InetAddressCachePolicy.<clinit>() line: not available   
InetAddress$Cache.getPolicy() line: not available   
InetAddress$Cache.put(String, Object) line: not available   
InetAddress.cacheInitIfNeeded() line: not available 
InetAddress.cacheAddress(String, Object, boolean) line: not available   
InetAddress.getAddressFromNameService(String, InetAddress) line: not available  
InetAddress.getLocalHost() line: not available  
SeedGenerator$1.run() line: not available   
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]  
SeedGenerator.getSystemEntropy() line: not available    
SecureRandom$SeederHolder.<clinit>() line: not available    
SecureRandom.engineNextBytes(byte[]) line: not available    
SecureRandom.nextBytes(byte[]) line: not available  
SecureRandom.next(int) line: not available  
SecureRandom(Random).nextInt() line: not available  
DefaultSSLContextImpl(SSLContextImpl).engineInit(KeyManager[], TrustManager[], SecureRandom) line: not available    
DefaultSSLContextImpl.<init>() line: not available  
NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method]   
NativeConstructorAccessorImpl.newInstance(Object[]) line: not available 
DelegatingConstructorAccessorImpl.newInstance(Object[]) line: not available 
Constructor<T>.newInstance(Object...) line: not available   
Class<T>.newInstance0() line: not available 
Class<T>.newInstance() line: not available  
Provider$Service.newInstance(Object) line: not available    
GetInstance.getInstance(Provider$Service, Class) line: not available    
GetInstance.getInstance(String, Class, String) line: not available  
SSLContext.getInstance(String) line: not available  
SSLContext.getDefault() line: not available 
SSLSocketFactory.getDefault() line: not available   
HttpsURLConnection.getDefaultSSLSocketFactory() line: not available 
HttpsURLConnectionImpl(HttpsURLConnection).<init>(URL) line: not available  
HttpsURLConnectionImpl.<init>(URL, Proxy, Handler) line: not available  
Handler.openConnection(URL, Proxy) line: not available  
Handler.openConnection(URL) line: not available 
URL.openConnection() line: not available    
4

0 回答 0