2016-06-08 4 views
0

J'ai une classe User qui a plusieurs attributs et un String appelé ID afin qu'il corresponde à ma table DB appelée User. En ce moment ma table User est vide. Chaque fois que je essayer:Azure Mobile App: Android .get() provoque l'application à geler

mClient.getTable(User.class).insert(myUser).get(); 

ou

mClient.getTable(User.class).execute().get(); 

Mon gèle app sur un écran blanc et la console ne montre aucune erreur. La pileTrace ou les impressions que je fais dans ma clause catch n'apparaissent jamais.

Les seules erreurs que je reçois sont:

06-08 23:23:35.287 28469-28469/t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 

Voici le code que je l'utilise dans mon onCreate Méthode pour:

User myUser = new User(); 
// fill in myUser's fields but Id. 
new Runnable() { 
     @Override 
     public void run() { 
      try { 
       User myUser2 = mClient.getTable(User.class).insert(myUser).get(); 
       System.out.println("Successfully added the user !"); 
      } catch (Exception e) { 
       e.printStackTrace(); 
      } 
     } 
    }.run(); 

Je suis nouveau à azur et je ne pouvais pas trouver d'aide avec mon ami google. Merci d'avance.

EDIT: Voici l'ensemble logcat:

t2g.com.travel2gather I/art: Not late-enabling -Xcheck:jni (already on) 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather I/art: System.exit called, status: 1 
t2g.com.travel2gather I/AndroidRuntime: VM exiting with result code 1, cleanup skipped. 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather 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 
t2g.com.travel2gather D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 
            [ 06-08 23:19:29.602 24915:24915 D/   ] 
            HostConnection::get() New Host Connection established 0xabead140, tid 24915 
            [ 06-08 23:19:29.665 24915:24962 D/   ] 
            HostConnection::get() New Host Connection established 0xa313a110, tid 24962 
t2g.com.travel2gather I/OpenGLRenderer: Initialized EGL, version 1.4 
t2g.com.travel2gather W/EGL_emulation: eglSurfaceAttrib not implemented 
t2g.com.travel2gather W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2cee100, error=EGL_SUCCESS 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather 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 
t2g.com.travel2gather D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 
            [ 06-08 23:21:25.518 26595:26595 D/   ] 
            HostConnection::get() New Host Connection established 0xabead0c0, tid 26595 
            [ 06-08 23:21:25.587 26595:26642 D/   ] 
            HostConnection::get() New Host Connection established 0xa3134130, tid 26642 
t2g.com.travel2gather I/OpenGLRenderer: Initialized EGL, version 1.4 
t2g.com.travel2gather W/EGL_emulation: eglSurfaceAttrib not implemented 
t2g.com.travel2gather W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2cc2220, error=EGL_SUCCESS 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/data/t2g.com.travel2gather/lib 
t2g.com.travel2gather W/art: Suspending all threads took: 11.368ms 
t2g.com.travel2gather E/Surface: getSlotFromBufferLocked: unknown buffer: 0xabea8b30 
t2g.com.travel2gather I/Choreographer: Skipped 40 frames! The application may be doing too much work on its main thread. 
t2g.com.travel2gather W/EGL_emulation: eglSurfaceAttrib not implemented 
t2g.com.travel2gather W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2cc2220, error=EGL_SUCCESS 
t2g.com.travel2gather W/EGL_emulation: eglSurfaceAttrib not implemented 
t2g.com.travel2gather W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa36a0480, error=EGL_SUCCESS 
t2g.com.travel2gather E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa2971570 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/data/t2g.com.travel2gather/lib 
t2g.com.travel2gather W/EGL_emulation: eglSurfaceAttrib not implemented 
t2g.com.travel2gather W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa227e720, error=EGL_SUCCESS 
t2g.com.travel2gather W/art: Suspending all threads took: 10.473ms 
t2g.com.travel2gather I/art: Not late-enabling -Xcheck:jni (already on) 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather 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 
t2g.com.travel2gather I/art: Background partial concurrent mark sweep GC freed 8584(1343KB) AllocSpace objects, 5(1600KB) LOS objects, 39% free, 3MB/6MB, paused 1.655ms total 226.868ms 
t2g.com.travel2gather D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 
            [ 06-08 23:22:25.364 27456:27456 D/   ] 
            HostConnection::get() New Host Connection established 0xab6d42e0, tid 27456 
t2g.com.travel2gather W/art: Verification of void com.squareup.okhttp.internal.http.HttpEngine.readResponse() took 169.113ms 
         [ 06-08 23:22:25.428 27456:27508 D/   ] 
         HostConnection::get() New Host Connection established 0xab6d48c0, tid 27508 
t2g.com.travel2gather I/OpenGLRenderer: Initialized EGL, version 1.4 
t2g.com.travel2gather W/EGL_emulation: eglSurfaceAttrib not implemented 
t2g.com.travel2gather W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa37d7c80, error=EGL_SUCCESS 
t2g.com.travel2gather W/art: Verification of okio.Source com.squareup.okhttp.internal.http.HttpConnection.newChunkedSource(com.squareup.okhttp.internal.http.HttpEngine) took 157.042ms 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/data/t2g.com.travel2gather/lib 
t2g.com.travel2gather I/art: Background partial concurrent mark sweep GC freed 107958(3MB) AllocSpace objects, 1(240KB) LOS objects, 40% free, 4MB/6MB, paused 9.332ms total 199.896ms 
t2g.com.travel2gather W/art: Suspending all threads took: 5.557ms 
t2g.com.travel2gather I/art: Background sticky concurrent mark sweep GC freed 70224(2MB) AllocSpace objects, 6(364KB) LOS objects, 0% free, 7MB/7MB, paused 7.961ms total 76.058ms 
t2g.com.travel2gather I/art: Background partial concurrent mark sweep GC freed 11587(629KB) AllocSpace objects, 5(2040KB) LOS objects, 39% free, 5MB/8MB, paused 5.417ms total 20.421ms 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather I/art: Background sticky concurrent mark sweep GC freed 14786(1156KB) AllocSpace objects, 1(20KB) LOS objects, 72% free, 1024KB/3MB, paused 19.184ms total 31.942ms 
t2g.com.travel2gather W/art: Suspending all threads took: 5.952ms 
t2g.com.travel2gather W/art: Suspending all threads took: 6.214ms 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather I/art: System.exit called, status: 1 
t2g.com.travel2gather I/AndroidRuntime: VM exiting with result code 1, cleanup skipped. 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather I/art: WaitForGcToComplete blocked for 5.428ms for cause Background 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather I/art: Background sticky concurrent mark sweep GC freed 164(34KB) AllocSpace objects, 0(0B) LOS objects, 22% free, 666KB/856KB, paused 8.272ms total 38.306ms 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather W/System: ClassLoader referenced unknown path: /data/app/t2g.com.travel2gather-1/lib/x86 
t2g.com.travel2gather I/art: Background sticky concurrent mark sweep GC freed 6278(406KB) AllocSpace objects, 0(0B) LOS objects, 13% free, 1497KB/1729KB, paused 5.499ms total 20.437ms 

Répondre

1

Azure App Mobile: Android .get() provoque l'application de geler

Parce que l'appel .run() comme méthode au lieu de passer Runnable à Thread.

Créer une Thread:

Runnable mRunnable=new Runnable() 
    { 
    // your code here 
    }; 

et passer mRunnable objet à elle:

Thread thread = new Thread(mRunnable); 
thread.start(); 
+0

Bon sang, j'oublié ça ... Merci! – Dliix