只是尝试运行教程,我收到此错误。我无法理解错误。我在我的应用程序类中使用initApp,也许是它的问题?
有什么建议吗?
public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
String appVersion = "v1";
Backendless.initApp( this, getString(R.string.backId), getString(R.string.backSecretKey), appVersion );
}
}
BackendlessUser user = new BackendlessUser();
user.setEmail( "michael@backendless.com" );
user.setPassword( "my_super_password" );
Backendless.UserService.register( user, new BackendlessCallback<BackendlessUser>()
{
@Override
public void handleResponse( BackendlessUser backendlessUser )
{
Log.i( "Registration", backendlessUser.getEmail() + " successfully registered" );
}
} );
答案 0 :(得分:0)
您可能忘记在清单文件中提供互联网权限。 Pelase在清单文件中添加以下权限。
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />