![]() |
|
Programación y Desarrollo para Android Subforo exclusivo para temas de programación de software para PDAs y desarrollo de aplicaciones, interfaces, etc bajo Android |
«
Tema Anterior
|
Siguiente tema
»
|
Herramientas |
#1
|
||||
|
||||
App no se instala en Android 5.0
Saludos.
He desarrollado una aplicación que funciona perfectamente en 4.4 pero la voy a instalar en una tablet con 5.0 y me da error "Aplicación no instalada". Si la intento debugear me pone el mensaje "INSTALL_FAILED_DEXOPT". No he cambiado nada de la aplicación, únicamente el dispositivo fisico. ¿Como puedo resolverlo? He intentado actualizar a la version 5.1 pero me dice que tengo instalada la ultima version disponible para este dispositivo. |
|
#2
|
||||
|
||||
Puede que dentro de tu app estés usando fragmentos de código que quedaron obsoletos e incompatibles con versiones superiores a la 4.4...
|
#3
|
||||
|
||||
¿Y por qué en el 5.1 funciona?
Os pongo un extracto del log por si me pudierais orientar 09-01 10:01:57.280: A/dex2oat(4295): art/compiler/dex/quick/ralloc_util.cc:406] No free temp registers 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] Runtime aborting... 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] Aborting thread: 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] "Compiler driver thread pool worker thread 1" prio=5 tid=2 Native (still starting up) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] | group="" sCount=0 dsCount=0 obj=0x0 self=0xb2f06400 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] | sysTid=4301 nice=0 cgrp=apps/bg_non_interactive sched=0/0 handle=0xb6366580 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] | state=R schedstat=( 2581567840 336951891 863 ) utm=248 stm=10 core=3 HZ=100 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] | stack=0xb3200000-0xb3202000 stackSize=1024KB 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] | held mutexes= "abort lock" "mutator lock"(shared held) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #00 pc 00004640 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #01 pc 00002e8d /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #02 pc 00248379 /system/lib/libart.so (art: ![]() 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #03 pc 0022cd03 /system/lib/libart.so (art::Thread: ![]() 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #04 pc 0021d05f /system/lib/libart.so (art::AbortState: ![]() 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #05 pc 0021d2c5 /system/lib/libart.so (art::AbortState: ![]() 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #06 pc 0021d491 /system/lib/libart.so (art::Runtime::Abort()+72) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #07 pc 000a834b /system/lib/libart.so (art::LogMessage::~LogMessage()+1322) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #08 pc 001026df /system/lib/libart-compiler.so (art::Mir2Lir::AllocTempBody(art::GrowableArray<ar t::Mir2Lir::RegisterInfo*>&, int*, bool)+370) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #09 pc 00102751 /system/lib/libart-compiler.so (art::Mir2Lir::AllocTemp(bool)+12) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #10 pc 000a8bd7 /system/lib/libart-compiler.so (art::ArmMir2Lir::LoadStoreUsingInsnWithOffsetImm8 Shl2(art::ArmOpcode, art::RegStorage, int, art::RegStorage, art::RegStorage)+54) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #11 pc 000aa907 /system/lib/libart-compiler.so (art::ArmMir2Lir::StoreBaseDispBody(art::RegStorag e, int, art::RegStorage, art::OpSize)+814) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #12 pc 000ab29d /system/lib/libart-compiler.so (art::ArmMir2Lir::StoreBaseDisp(art::RegStorage, int, art::RegStorage, art::OpSize, art::VolatileKind)+44) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #13 pc 000deeb1 /system/lib/libart-compiler.so (art::Mir2Lir::StoreValueWide(art::RegLocation, art::RegLocation)+280) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #14 pc 000ddfd3 /system/lib/libart-compiler.so (art::Mir2Lir::GenInvokeNoInline(art::CallInfo*)+5 86) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #15 pc 000fc87f /system/lib/libart-compiler.so (art::Mir2Lir::CompileDalvikInstruction(art::MIR*, art::BasicBlock*, art::LIR*)+2638) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #16 pc 000fdda7 /system/lib/libart-compiler.so (art::Mir2Lir::MethodBlockCodeGen(art::BasicBlock* )+330) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #17 pc 000fdf25 /system/lib/libart-compiler.so (art::Mir2Lir::MethodMIR2LIR()+140) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #18 pc 000cebf3 /system/lib/libart-compiler.so (art::Mir2Lir::Materialize()+118) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #19 pc 00145bd7 /system/lib/libart-compiler.so (???) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #20 pc 00146217 /system/lib/libart-compiler.so (ArtQuickCompileMethod+38) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #21 pc 0015cd21 /system/lib/libart-compiler.so (art::CompilerDriver::CompileMethod(art: ![]() ![]() ![]() 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #22 pc 0015d3c5 /system/lib/libart-compiler.so (art::CompilerDriver::CompileClass(art::ParallelCo mpilationManager const*, unsigned int)+1204) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #23 pc 00153d4d /system/lib/libart-compiler.so (???) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #24 pc 00236aab /system/lib/libart.so (art::ThreadPoolWorker::Run()+34) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #25 pc 002372f9 /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #26 pc 000137bb /system/lib/libc.so (__pthread_start(void*)+30) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] native: #27 pc 0001189b /system/lib/libc.so (__start_thread+6) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] (no managed stack frames) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] Dumping all threads without appropriate locks held: thread list lock mutator lock 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] All threads: 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] DALVIK THREADS (4): 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] "main" prio=5 tid=1 Native (still starting up) 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] | group="" sCount=0 dsCount=0 obj=0x0 self=0xb6307400 09-01 10:01:57.340: A/dex2oat(4295): art/runtime/runtime.cc:286] | sysTid=4295 nice=0 cgrp=apps/bg_non_interactive sched=0/0 handle=0xb6f03ec8 |
#4
|
||||
|
||||
¿Con que API de android lo compilaste?, si fue con una version anterior a Lollipop puede que ese sea el problema
|
#5
|
Si yo opino lo mismo actualiza tu app a api 21, y haber si se soluciona.
|
#6
|
||||
|
||||
He probado con la api 21 y me sigue dando el mismo problema tanto en el emulador como en el dispositivo.
No entiendo los errores que el log me esta dando y el problema que tengo es que en las maquinas que pruebo no existe actualizacion a 5.1 que se que funciona perfectamente. |
#7
|
||||
|
||||
Tiene pinta de que tu APP (por el motivo que sea, incluso las primeras versiones de WhatsApp después de aparecer no eran compatibles) no es compatible con ART.
¿El móvil 5.1 donde lo estás probando por casualidad es un Samsung? Samsung en (su mayoría) de dispositivos con 5.0 NO disponen de la opción de usar ART, teniendo que usar Dalvik si o si, y en los que traen 5.1 Dalvik es por defecto y ART es opcional (Teóricamente ART debería ser la opción por defecto desde 5.0, pero en Samsung no es así, al menos con ROMs oficiales, precisamente porque su TouchWiz no es compatible con ART) Así que yo apostaría a que estás probando la app en un 5.0 en un móvil NO Samsung (O sin ROM oficial) y la 5.1 en un Samsung con ROM oficial. |
#8
|
||||
|
||||
Efectivamente estoy probando en un Samsung S5 con 5.0 y tambien en una Lenovo TAB 2 A7-10F con 5.0. Probando en el samsung S6 con 5.1.1 me funciona correctamente y en otra tablet de samsung con 4.4 tambien me funciona.
Estoy desarrollando con ADT de eclipse y para compatibilizar mi aplicacion para casos especiales que tengan 5.0 ¿Que deberia hacer para trabajar usando Dalvik? Gracias y saludos |
#9
|
||||
|
||||
Cita:
|
#10
|
||||
|
||||
ART es el nuevo runtime que incorpora la version 5.0. ¿Como puedo hacer mi app compatible con este nuevo runtime? ¿Hay alguna opcion usando eclipse? ¿Se puede hacer usando Android Studio?
|
#11
|
||||
|
||||
¿La app usa alguna biblioteca nativa por JNI? ¿Está "ofuscada" con ProGuard o similar?
Según la web de desarrolladores de Google son los puntos más importantes a revisar https://developer.android.com/guide/...-apps-art.html En el primer caso tendrás que ver si el problema es de una biblioteca y ver si hay versiones nuevas. En el de ProGuard jugar con la configuración por si se ha cargado alguna clase que no debiera por el camino. |
#12
|
||||
|
||||
Cita:
|
#13
|
||||
|
||||
En depuracion tampoco funciona.
|
#14
|
||||
|
||||
En esta parte del log que tiene los problemas del runtime:
08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #00 pc 00004640 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #01 pc 00002e8d /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #02 pc 00248379 /system/lib/libart.so (art: ![]() 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #03 pc 0022cd03 /system/lib/libart.so (art::Thread: ![]() 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #04 pc 0021d05f /system/lib/libart.so (art::AbortState: ![]() 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #05 pc 0021d2c5 /system/lib/libart.so (art::AbortState: ![]() 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #06 pc 0021d491 /system/lib/libart.so (art::Runtime::Abort()+72) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #07 pc 000a834b /system/lib/libart.so (art::LogMessage::~LogMessage()+1322) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #08 pc 001026df /system/lib/libart-compiler.so (art::Mir2Lir::AllocTempBody(art::GrowableArray<ar t::Mir2Lir::RegisterInfo*>&, int*, bool)+370) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #09 pc 00102751 /system/lib/libart-compiler.so (art::Mir2Lir::AllocTemp(bool)+12) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #10 pc 000a8bd7 /system/lib/libart-compiler.so (art::ArmMir2Lir::LoadStoreUsingInsnWithOffsetImm8 Shl2(art::ArmOpcode, art::RegStorage, int, art::RegStorage, art::RegStorage)+54) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #11 pc 000aa907 /system/lib/libart-compiler.so (art::ArmMir2Lir::StoreBaseDispBody(art::RegStorag e, int, art::RegStorage, art::OpSize)+814) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #12 pc 000ab29d /system/lib/libart-compiler.so (art::ArmMir2Lir::StoreBaseDisp(art::RegStorage, int, art::RegStorage, art::OpSize, art::VolatileKind)+44) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #13 pc 000deeb1 /system/lib/libart-compiler.so (art::Mir2Lir::StoreValueWide(art::RegLocation, art::RegLocation)+280) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #14 pc 000ddfd3 /system/lib/libart-compiler.so (art::Mir2Lir::GenInvokeNoInline(art::CallInfo*)+5 86) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #15 pc 000fc87f /system/lib/libart-compiler.so (art::Mir2Lir::CompileDalvikInstruction(art::MIR*, art::BasicBlock*, art::LIR*)+2638) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #16 pc 000fdda7 /system/lib/libart-compiler.so (art::Mir2Lir::MethodBlockCodeGen(art::BasicBlock* )+330) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #17 pc 000fdf25 /system/lib/libart-compiler.so (art::Mir2Lir::MethodMIR2LIR()+140) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #18 pc 000cebf3 /system/lib/libart-compiler.so (art::Mir2Lir::Materialize()+118) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #19 pc 00145bd7 /system/lib/libart-compiler.so (???) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #20 pc 00146217 /system/lib/libart-compiler.so (ArtQuickCompileMethod+38) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #21 pc 0015cd21 /system/lib/libart-compiler.so (art::CompilerDriver::CompileMethod(art: ![]() ![]() ![]() 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #22 pc 0015d3c5 /system/lib/libart-compiler.so (art::CompilerDriver::CompileClass(art::ParallelCo mpilationManager const*, unsigned int)+1204) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #23 pc 00153d4d /system/lib/libart-compiler.so (???) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #24 pc 00236aab /system/lib/libart.so (art::ThreadPoolWorker::Run()+34) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #25 pc 002372f9 /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #26 pc 000137bb /system/lib/libc.so (__pthread_start(void*)+30) 08-31 17:57:45.017: A/dex2oat(28113): art/runtime/runtime.cc:286] native: #27 pc 0001189b /system/lib/libc.so (__start_thread+6) como puedo averiguar que libreria es la que falla? |
#15
|
||||
|
||||
EDIT: Creo la clave es el mensaje "no free temp registers" del mensaje de error que pusiste en la página anterior.
Hay al menos un par de bugs en ART de mediados y finales de 2014 que han sido resueltos y que provocaban esos errores. Eso explicaría que en 5.0 pudiera fallar y en 5.1 no, coincide con las fechas entre versiones. ¿En Android 5.0.1 funcionaba o tampoco? ¿Y en el emulador? Texto original: Así a ojo son mensajes de error que podrían ser de cualquier cosa. Supuesto que sea alguna biblioteca de terceros igual terminas antes mirando cuáles/cuántas usas y viendo si tienes la última versión y si tienen algún problema conocido con ART. Última edición por mocelet Día 02/09/15 a las 21:21:19 |
#16
|
||||
|
||||
En el 5.0.1 tampoco funciona. En el emulador tampoco.
Me ha funcionado en la 5.1 Como soluciono dichos bug y a cuales te refieres? Gracias |
#17
|
||||
|
||||
Si los bugs son del propio Android no podrías arreglarlos. Aunque en 5.0.1 arreglaron bastantes, así que es raro.
¿Y el error es al instalar dices? Ahí ya me quedo sin ideas Última edición por mocelet Día 03/09/15 a las 11:52:46 |
#18
|
||||
|
||||
Hola a tod@s, soy un compañero de Usepe.
en dispositivos/emuladores con Android 5.1.x no hay problema, se instala perfectamente, pero en dispositivos/emuladores con android 5.0.x da siempre el mismo fallo, usando proguard o sin usarlo, con el apk firmada o sin firmar. usamos Eclipse + ADT 23.0.2.1259578 Android SDK Tools v24.3.4 Android SDK Platform-tools v23 El proyecto usa las librerías android-support-v4.jar commons-net-3.3.jar google-play-services.jar itextpdf-5.5.6.jar Les dejo el log: 09-03 13:57:13.349: E/memtrack(25687): Couldn't load memtrack module (No such file or directory) 09-03 13:57:13.349: E/android.os.Debug(25687): failed to load memtrack module: -2 09-03 13:57:25.584: A/dex2oat(25701): art/compiler/dex/quick/ralloc_util.cc:398] No free temp registers 09-03 13:57:25.587: A/libc(25701): Fatal signal 6 (SIGABRT), code -6 in tid 25701 (main) 09-03 13:57:35.888: E/DEBUG(25706): timed out waiting for tid=25702 to stop 09-03 13:57:36.107: E/DEBUG(25706): timed out waiting for tid=25703 to stop 09-03 13:57:36.316: E/DEBUG(25706): timed out waiting for tid=25704 to stop 09-03 13:57:36.496: E/DEBUG(25706): timed out waiting for tid=25705 to stop 09-03 13:57:36.508: E/SharedPreferencesImpl(531): Couldn't create directory for SharedPreferences file shared_prefs/log_files.xml 09-03 13:57:36.601: E/installd(145): DexInv: --- END '/data/app/terandroid.app-1/base.apk' --- status=0x0006, process failed Última edición por defcon1_es Día 03/09/15 a las 16:09:13 |
#19
|
||||
|
||||
He migrado de Eclipse+ADT a AndroidStudio 1.2.2 y este es el mensaje que da:
Target device: lenovo-tab2a7_10f-0123456789ABCDEF Uploading file local path: C:\Documents and Settings\Administrador\AndroidStudioProjects\TerAn droid\terAndroid\build\outputs\apk\terAndroid-debug.apk remote path: /data/local/tmp/terandroid.app Installing terandroid.app DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/terandroid.app" pkg: /data/local/tmp/terandroid.app Failure [ INSTALL_FAILED_DEXOPT ] En este momento, me aparece la siguiente ventana : ![]() Y al pulsar "OK" me aparecen los siguientes mensajes: DEVICE SHELL COMMAND: pm uninstall terandroid.app DELETE_FAILED_INTERNAL_ERROR Este es el contenido de build.gradle (Module: terAndroid) apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion '23.0.1' //'21.1.2' defaultConfig { applicationId "terandroid.app" minSdkVersion 15 targetSdkVersion 22 // Enabling multidex support. multiDexEnabled true } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt', 'proguard-project.txt' } } dexOptions { incremental true } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 encoding = 'ISO-8859-1' } productFlavors { } } dependencies { compile project(':library') compile 'com.android.support:support-v4:22.2.0'compile files('libs/commons-net-3.3.jar') compile files('libs/itextpdf-5.5.4.jar') compile files('libs/pinchzoom.jar')compile 'com.google.android.gms:play-services:7.5.0' } Última edición por defcon1_es Día 04/09/15 a las 11:02:11 |
|
#20
|
||||
|
||||
Ese error te lo da porque hay instalado una librería en el sistema que difiere en versión de la que estás tratando de instalar.
Nunca me ha pasado, de hecho en una app he sobreescrito a librerías que están presentes en el sistema y me ha funcionado perfectamente, ya que las lee desde mi app y no desde el sistema. Si tuviese que apostar diría que es porque estáis usando el soporte MultiDex, y al intentar instalar por separado y no dentro del propio classes.jar a librerías existentes casca. Prueba quitando el soporte MultiDex, y si sigue fallando, quitad el "commons-net", que creo que debe ser el culpable al intentar machacar las librerías Apache del sistema. |
Respuesta |
![]() |
||||||
|
«
Tema Anterior
|
Siguiente tema
»
|
|
Hora actual: 06:35:25 (GMT +2)
HTCMania: líderes desde el 2007