Help with Android Studio app

Asked

Viewed 92 times

0

I made an application, and now I changed the minSdkVersion to run in previous versions of android. Only when installing the same in the emulator works normally, but when installing on the phone it gives me the following message: The

app 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 it seems that the Asynctask tben does not run

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) 
  • Reinstall the application and leave the phone connected by usb, run the application and paste here the error that appears in logcat.

  • Enter the Asynctask code.

  • solved. I put a previous version of the jtds and it worked. thank you

2 answers

0

as Voce changed to support earlier versions, may have compatibility problem, make sure to run it in the emulator with the same version of your phone and see if it appears the same error, and when it appears, send the msg of the logcat to us, so you can’t know what’s going on.

  • Renato, in version 5.1 it rotates normally. I am testing in version 4.2, 4.1 2 2.3 and not wheel. Voce talks about creating an emulator in this version to test?

  • This Asynctask error goes to version 4.4

  • I made a test here by placing the emulator in version 4.3 and 4.4 of an error in Asynctask

  • probably a connection error

0

solved. I put a previous version of the jtds and it worked. thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.