Re-installation failed due to different application signatures – Android Error
Cause
Mainly this error occur for same application sign.If you port your app to another device, there may be a problem with keystores. it’s called debug.keystore and located in %USER_HOME%/.android/ folder. It happens because eclipse tries to push apk with re-install key.
The digital signature is driven by a signing key that exists on the machine that signs the app. If Developer A compiles an app using the standard debug key and installs it in an emulator, then tries installing some other variation of the app — one signed with a production key, one signed with Developer B’s debug key, etc. — in the same emulator, you will get that error.
** UPDATE: Android Complete tutorial now available here.
Solution 1:
1.Share debug.keystore between various development pcs (if your project been ported to another PC)
2.Uninstall the application from your mobile if you load it already.
3.To uninstall goto settings->application->manage application.
4.Run the application again and choose the mobile
5.You can also run this command adb -d uninstall
Solution 2
Start up the emulator by running or debugging the application, do a full apk uninstall via ADB (Android Debug Bridge), and then re-install, do this by following the steps below:
1. Locate adb found in c:{android sdk location}platform-toolsadb.exe
2. Open the command prompt in this location
3. RunDebug your app in Eclipse to start the emulator and wait for the error to be outputted (now you know the device has settled and the apk-install was attempted
4. Execute the following command from the command prompt window you opened in step 2 , adb uninstall {name of your apk e.g. com.myapp}
5. Once the success message is displayed in command prompt then re-install the apk. The quickest way to re-install from this point is to open the debug perspective in Eclipse while you are still debugging from step 3 then in the Debug window right-click on the application and click Relaunch, this will re-install the APK with the correct key.
Solution 3
Share a single debug.keystore across multiple computer
Copy the default debug.keystore from the one machine to the other machine(s) into a known location.
To get the location of the default debug.keystore:
1. Open Eclipse click window->preferences
2. Go to android->build the location in the Default debug keystore textbox
3. Once you have shared/copied the debug.keystore onto the various computers update the eclipse setting Custom debug keystore to point to this debug.keystore .
Conversion to dalvik format failed with error 1 : Android Error
Go to Project» Properties» Java Build Path» Libraries and remove all except the “Android X.Y” (in my case Android 1.5). click OK. Go to Project» Clean» Clean projects selected below» select your project and click OK. That should work.
It is also possible that you have a JAR file located somewhere in your project folders (I had copied the Admob JAR file into my src folder) and THEN added it as a Java Path Library. It does not show up under the Package Explorer, so you don’t notice it, but it does get counted twice, causing the dreaded Dalvik error 1.
** UPDATE: Android Complete tutorial now available here.
Another possible reason could be package name conflicts. Suppose you have a package com.abc.xyz and a class named A.java inside this package, and another library project (which is added to the dependency of this project) which contains the same com.abc.xyz.A.java, then you will be getting the exact same error. This means, you have multiple references to the same file A.java and can’t properly build it.
Windows 7 Solution:
Confirmed the problem is caused by ProGuard command line in the file,
[Android SDK Installation Directory]toolsproguardbinproguard.bat
Edit the following line will solve the problem:
call %java_exe% -jar "%PROGUARD_HOME%"libproguard.jar %*
to
call %java_exe% -jar "%PROGUARD_HOME%"libproguard.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
Here’s another scenario, and solution:
If you run into this problem recently after updating the ADT for Eclipse:
In your app project, check for any linked source folders pointing to your library projects (they have names in the form “LibraryName_src”).
Select all those projects, right-click, choose “Build Path”->”Remove from Build Path”. Choose “Also unlink the folder from the project”, and click “Yes”. Clean, rebuild and redeploy the project.
It seems the reason is that some previous version of ADT linked Library project source folders to the “child” projects, and the current ADT/Dex combination isn’t compatible with that solution anymore.
Read More
How do you enable a microphone input in the android emulator?
If you are trying to get the audio from Android emulator, you can not be successful. You can try this with different ways like by writing a custom speech to text application, by trying to compile voice recognition sample at Android SDK or by using in-built Speech Recorder on a Google API supported android emulator.
** UPDATE: Android Complete tutorial now available here.
You would have given proper permission and you might have also selected Audio play back support in Hardware selection in creating new AVD (Android Virtual Device).
For the original path of this information follow this link : http://developer.android.com/guide/topics/media/audio-capture.html
How to change Wicket to deployment mode
By default, Wicket is running in development mode. In this post we will see how to change that to Deployment mode ( commonly called as production mode ).
There is two method to change wicket to run in deployment (production) mode :
1. web.xml
The first st way is add a ‘configuration’ context-param in web.xml.
File : web.xml
<?xml version="1.0" encoding="ISO-8859-1"?> <web-app ... > ... <filter> <filter-name>wicket.app</filter-name> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> <init-param> <param-name>applicationClassName</param-name> <param-value>org.starobjects.wicket.viewer.app.WicketObjectsApplication</param-value> </init-param> <init-param> <param-name>configuration</param-name> <param-value>deployment</param-value> </init-param> </filter> </web-app>
The system property is checked first, allowing you to add a web.xml param for deployment, and a command-line override when you want to run in development mode during development.
2. Wicket getConfigurationType()
The 2nd way is override the Wicket application getConfigurationType() method.
File : Wicket Application class
import org.apache.wicket.Application; import org.apache.wicket.protocol.http.WebApplication; public class WicketApplication extends WebApplication { @Override public String getConfigurationType() { return Application.DEPLOYMENT; } }
How do I know in what mode (DEVELOPMENT/DEPLOYMENT) my application runs?
As of Wicket 1.3.0, you can call Application.getConfigurationType(). Prior to that, there is no flag telling you in which mode you are. If you want a flag subclass Application.configure() store the “configurationType” parameter in a variable.
if (DEVELOPMENT.equalsIgnoreCase(configurationType)) { log.info("You are in DEVELOPMENT mode"); getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); getDebugSettings().setComponentUseCheck(true); getDebugSettings().setSerializeSessionAttributes(true); getMarkupSettings().setStripWicketTags(false); getExceptionSettings().setUnexpectedExceptionDisplay( UnexpectedExceptionDisplay.SHOW_EXCEPTION_PAGE); getAjaxSettings().setAjaxDebugModeEnabled(true); } else if (DEPLOYMENT.equalsIgnoreCase(configurationType)) { getResourceSettings().setResourcePollFrequency(null); getDebugSettings().setComponentUseCheck(false); getDebugSettings().setSerializeSessionAttributes(false); getMarkupSettings().setStripWicketTags(true); getExceptionSettings().setUnexpectedExceptionDisplay( UnexpectedExceptionDisplay.SHOW_INTERNAL_ERROR_PAGE); getAjaxSettings().setAjaxDebugModeEnabled(false); }
Read More