Why is the Android app that sends data to SQL Database not working on the phone, but in AVD on Android Studio?

I am trying to make an ANDROID APP that sends data from phone to SQL database in Azure cloud.

I followed as close as possible to the tutorials given at https://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-android-get-started/

First Off All, I got a little confusion. As for creating the .apk file in android studio. Here I assumed my .apk is located in \ app \ build \ output.

Now I try to run app-debug.apk on my REDMI 1s Android version 4.3 JLS36C, the app just opens and disappears. I also tried to run it on Samsung Galaxy Note-3 Neo (SM-N750) Android Version: Android 4.4.2

When I try to run the application on the emulator it works. But not on phones. What to do? Here is my build.gradle file

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion "19.1.0"

defaultConfig {
    applicationId "com.example.zumoappname"
    minSdkVersion 8
    targetSdkVersion 20
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

repositories {
    flatDir {
        dirs 'aars'
        }
    }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.code.gson:gson:2.3'
compile 'com.google.guava:guava:18.0'
compile 'com.microsoft.azure:azure-mobile-services-android-sdk:2.0.2'
compile (group: 'com.microsoft.azure', name: 'azure-notifications-handler', version: '1.0.1', ext: 'jar')
}

      

Please, help!

+3


source to share


1 answer


Try setting breakpoints in the onCreate method and step through the code so you can find out where the code is.

Another issue I have encountered is device crashes when the network connection is actually not available.



But definitely try to figure out which line of code is failing ...

+1


source







All Articles