我試圖在Azure門戶(Portal>移動服務> Android> Connect Existing Android App)中使用文檔在Android應用中實現Azure移動服務,並且在嘗試實例化MobileServiceClient
時遇到了java格式錯誤的URL錯誤。是拋出錯誤嘗試實施Azure移動服務的Android格式錯誤的URL錯誤
代碼:
mClient = new MobileServiceClient(
"https://myurl.azure-mobile.net/",
"my_secret_squirrel_key",
this
);
編譯器引發此錯誤:
Unhandled exception:java.net.MalformedURLException
我已經添加了buildscript和編譯的項目/應用搖籃文件中的聲明。使用SDK 2.0.3版(也嘗試使用2.0.2)。
我已經添加權限清單文件,太:
<uses-permission android:name="android.permission.INTERNET" />
我用這中導入移動服務庫的活動:
import com.microsoft.windowsazure.mobileservices.*;
而且我聲明一個私人會員在同一活動中持有MobileServiceClient,如下所示:
private MobileServiceClient mClient;
使用Android工作室1.3.2。
嘗試使用相同的實現在本教程應用程序(第60行)從這裏(不是我的代碼) - https://github.com/Azure/mobile-services-samples/blob/master/GettingStartedWithData/AndroidStudio/GetStartedWithData/app/src/main/java/com/例如/ GetStartedWithData/ToDoActivity.java –