Android app crashes on launch
This is probably the first mistake that any Android developer makes, so seasoned developers will know this issue very well:
Three things MUST match on your android app:
The App.Java file, should take the following format:
package com.openmerchantaccount.ruby;
import android.webkit.WebSettings;import android.app.Activity;
import android.os.Bundle;
import com.phonegap.*;public class App extends DroidGap {
Your package name will be different, but I’m highlighting the important bit.
Then in the Android Manifest the (AndroidManifest.xml) should start as follows:
<?xml version=”1.0″ encoding=”utf-8″?>
<manifest xmlns:android=”http://schemas.android.com/apk/res/android”
package=”com.openmerchantaccount.ruby”
android:versionCode=”2″
android:versionName=”2″>
and end as follows:
<activity android:name=”com.openmerchantaccount.ruby.App”
android:label=”@string/app_name”
android:configChanges=”orientation|keyboardHidden”
>
<intent-filter>
<action android:name=”android.intent.action.MAIN” />
<category android:name=”android.intent.category.LAUNCHER” />
</intent-filter>
</activity></application>
</manifest>
If any of the three class names do not match, the app will crash on startup.