I made an application, and now I have changed the minSdkVersion to run on previous android versions. So when installing the same in the emulator it works normally, but when installing on the phone it gives me the following message:
Application stopped.
I made these settings
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "br.com.flextelecom.barbacena"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile files('libs/jtds-1.3.1.jar')
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
testCompile 'junit:junit:4.12'
}
Version 2.3 looks like Asynctask does not spin
08-01 12:36:36.889 1149-1997/br.com.flextelecom.barbacena E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:200)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)
Caused by: java.lang.VerifyError: net.sourceforge.jtds.jdbc.TdsCore
at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:359)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
at java.sql.DriverManager.getConnection(DriverManager.java:180)
at java.sql.DriverManager.getConnection(DriverManager.java:145)
at br.com.flextelecom.barbacena.Conexoes_Banco.ConexaoDao.dbConnect(ConexaoDao.java:31)
at br.com.flextelecom.barbacena.Conexoes_Banco.DaoCaptRioMortes.nomeTabela(DaoCaptRioMortes.java:55)
at br.com.flextelecom.barbacena.Actions_Main.Act_Capt_RioMortes$MinhaTask.doInBackground(Act_Capt_RioMortes.java:237)
at br.com.flextelecom.barbacena.Actions_Main.Act_Capt_RioMortes$MinhaTask.doInBackground(Act_Capt_RioMortes.java:188)
at android.os.AsyncTask$2.call(AsyncTask.java:185)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)