Lets au point, voici mon code:gel App lors de l'ajout table de back-end d'azur requête
private MobileServiceClient mClient;
private MobileServiceTable<tblClass> mTable;
@Override
protected void onCreate(Bundle savedInstanceState) {
getSupportActionBar().hide();
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if(getIntent().getBooleanExtra("Exit me", false)){
finish();
return;
}
try {
mClient = new MobileServiceClient(
"https://applink.azurewebsites.net",
this
);
mTable = mClient.getTable(tblClass.class);
// when this line added, the app freezes, with no information on the logcat
List<tblClass> results = mTable
.execute()
.get();
// end of the line
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (MobileServiceException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
}
i déjà essayer d'obtenir les données de retour à une liste à l'aide de cette
Toast.makeText(this, results.indexOf(0), Toast.LENGTH_SHORT).show();
et le résultat est toujours le même, l'application se bloque J'ai déjà essayé de le déboguer sur de nombreuses versions Android (de 4.4 à 7.0) aussi, quelqu'un peut-il me dire pourquoi cela se produit? Im juste apprendre android en un mois.
MISE À JOUR
c'est la dernière LogCat avant l'application se bloque
07-30 01:50:30.168 24014-24014/id.co.mandiri.e_absenmandiri I/InstantRun: starting instant run server: is main process
07-30 01:50:30.332 24014-24014/id.co.mandiri.e_absenmandiri W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
07-30 01:50:30.604 24014-24027/id.co.mandiri.e_absenmandiri I/art: Background sticky concurrent mark sweep GC freed 1973(388KB) AllocSpace objects, 0(0B) LOS objects, 20% free, 1579KB/1983KB, paused 5.293ms total 20.441ms