I have been doing some changes into the default ICS launcher2 . When I install it on a device it works fine. But when i try to install on emulator it gives me following error
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
I know that it happens because of the conflict between certificate of previously installed laucher on the emulator & the one i am trying to install. I also changed the package name & tried.That also works on device but not emulator.
Thank you.
Related
I've tried to install the application on Xiaomi Redmi 9 for the first after tring it on the emulator which worked fine but when I tried to install it on the physical device this error appeared The application could not be installed: INSTALL_FAILED_VERSION_DOWNGRADE
Before installing a popup message said to uninstall the existing app, but I've searched on the phone everywhere but there was no app installed.
I tried to install another application on the same phone it worked fine with no error, I've no idea how to deal with this problem.
I need your help and thank you in advance.
I have a clean Android project on Android Studio (just with a "hello world' screen), and I'm trying to install the app on my Samsung Galaxy S10e.
I click the Run button, and this is what I see in the Build Output:
And the apk is generated successfully.
But it's not launched and not installed on the device (no icon, and it doesn't appear in the apps list).
When I try manually installing the apk by adb install app-debug.apk, it works. The app shortcut appears on the device, it's added to the apps list, and I can launch the app.
At first also adb install didn't work, giving out the error INSTALL_FAILED_TEST_ONLY, but I solved that by adding android.injected.testOnly=false to gradle.properties.
I tried changing Gradle version to 6.0.1 (looks like this is the latest at the moment), and it didn't help.
I also have my device selected at the top:
How can I make Android Studio install and launch the app on my device?
Android Studio version: 3.5.3
Edit:
I'm seeing the same behavior on an Emulator. I opened AVD from Android Studio and chose Pixel 3A. The emulator opens up, I run the app, nothing happens on the emulator (and I see the same Build Output messages).
The same happens to me. It is probably a bug in Android Studio. At the second compilation the app installs correctly. It is tedious.
There isn't enough information to find the cause of this issue.
But since it works with adb, it means you run adb command. There could be only one instance of adb daemon running. So if it's involved externally my guess is Android Studio won't have access to it.
Possibly try adb kill-server and running again from Android Studio and see if that helps.
I encountered the same problem, which I solved by checking the running devices. The connected phone had 2 accounts (might be personal & work) which was listed on the list of devices, so I had to select the second option, and it ran successfully on my phone. see the attached image.
One thing it might be:
Enable usb debugging
Settings
System
Developer options
Turn the setting on for usb debugging
If it does not appear go to settings about phone. Then click on build number like 7-10 times and it will enable you to have the developer options appear.
If I build my App it works on my Android Emulator. If I use my real android device ( Samsung Galaxy S7 Edge) it also build, but uses an old version of my app. On the Emulator the newest version is always deployed. Do you know why? I don't get an error or sth. I want a debug apk.
I already tried to unistall the old version.
I already tried to ./gradlew assembleDebug
Thank you for your help
If you are executing the debug version on your device (not bundling for release) then that is expected.
You need to "shake" your device in order to enter the RN dev menu and choose refresh. That should trigger the on demand bundling again.
If this is not the case, then please post your errors, code, logs, etc.
Installation failed since the device possibly has stale dexed jars that don't match the current version (dexopt error).
In order to proceed, you have to uninstall the existing application.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
That's the pop-up I get when I try to run my app on the GenyMotion virtual device.
Installing com.example.engineering.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.engineering.app"
pkg: /data/local/tmp/com.example.engineering.app
Failure [INSTALL_FAILED_DEXOPT]
That's the console error message.
The odd thing is that even with a new clean "hello world" project I get the same error. It was working perfectly fine before I updated Android Studio. Something screwed up and I'm not sure what.
I've no idea what to do. I doubt it's GenyMotion related but who knows. I tried emulating a new device and reinstalling.
I presume you are running on API10 emulator. I also presume that you have tried removing the app yourself before trying to reinstall it. You are probably hitting 64k methods limit. Try running in say API19 emulator to see if you have the same issue.
I have created a small and simple android app. I tried installing it on an actual android device. But because it won't install, I created an AVD resembling my phone. I tried copying and installing app on that AVD and it still says that error. "Application xxx could not be installed on this phone".
Before I tried installing my app on the phone or AVD I following steps:
1. Exported an unsigned copy of application onto my hard-drive.
2. User jarsigner to sign the app
3. Verified with jarsigner that my app is signed properly.
4. Used zipalign to optimize the app resources.
I do not have an icon assigned to myapp but mandatory properties like version etc. have been specified properly.
I had initially developed app using 2.1 version but because of compatability issues with my phone I reverted code to compile on 1.5 and it still doesn't get installed either on AVD or my phone.
My AVD is on 2.1 though and code is compiled with 1.5.
Is there a place where I can see the logs as to why app is not getting installed. It would be really helpful.
Cheers
This can happen if you have a Debug version installed on the device already (from a USB debug session). Either do adb -d uninstall com.example.yourapp or uninstall in the Preferences->Applications screen on the phone itself.
Try using adb install to see if you get an error.
adb logcat will give you the logs from your device (phone or emulator) so you might find a stacktrace there.