Launching Android Activity from adb shell - android

I have an android application installed on my phone and i would like to launch one of the activities through the adb shell. Here is the manifest of the file:
EDIT I have also posted the logcat info below all of the manifest code and adb commands. It is throwing a NullPointerException.
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2010100" android:versionName="2.1.1" package="com.aurorasoftworks.quadrant.ui.standard"
xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" />
<application android:label="#string/app_name" android:icon="#drawable/icon" android:name="com.aurorasoftworks.quadrant.ui.standard.QuadrantStandardApplication">
<activity android:label="#string/app_name" android:name=".QuadrantStandardLauncherActivity" android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:label="#string/app_name" android:name=".QuadrantStandardActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity" android:screenOrientation="portrait" android:noHistory="true" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.score.BenchmarkScoreActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.browser.DeviceVendorListActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.browser.DeviceListActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.browser.DeviceStatsActivity" />
<activity android:label="#string/app_name" android:name="com.aurorasoftworks.quadrant.ui.sysinfo.SystemInfoActivity" />
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SET_ORIENTATION" />
</manifest>
I tried launching the QuadrantStandardActivity using the command:
adb shell am start -n com.aurorasoftworks.quadrant.ui.standard/.QuadrantStandardActivity
and it worked. But when I tried to connect to another activity it failed. The command I used was:
adb shell am start -n com.aurorasoftworks.quadrant.ui.standard/com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity
Logcat Info:
E/AndroidRuntime(11973): FATAL EXCEPTION: main
E/AndroidRuntime(11973): java.lang.NullPointerException
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.core.C.a(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.A.a(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity.h(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.r.apply$mcV$sp(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.r.a(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.ui.runner.r.apply(Unknown Source)
E/AndroidRuntime(11973): at com.aurorasoftworks.quadrant.util.r.run(Unknown Source)
E/AndroidRuntime(11973): at android.os.Handler.handleCallback(Handler.java:725)
E/AndroidRuntime(11973): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(11973): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(11973): at android.app.ActivityThread.main(ActivityThread.java:5074)
E/AndroidRuntime(11973): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(11973): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(11973): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime(11973): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime(11973): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 739): Force finishing activity com.aurorasoftworks.quadrant.ui.standard/com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity
W/ActivityManager( 739): Force finishing activity com.aurorasoftworks.quadrant.ui.standard/.QuadrantStandardActivity
W/ActivityManager( 739): Activity pause timeout for ActivityRecord{413150d0 u0 com.aurorasoftworks.quadrant.ui.standard/com.aurorasoftworks.quadrant.ui.runner.BenchmarkExecutionActivity}
I/ActivityManager( 739): Process com.aurorasoftworks.quadrant.ui.standard (pid 11973) has died.
I would appreciate any help

when start the BenchmarkExecutionActivity throws a NullPointerException,check the code why throws the exception.

.BenchmarkExecutionActivity
should be in
com.aurorasoftworks.quadrant.ui.standard
package. either change your package name in the first line of manifest from
package="com.aurorasoftworks.quadrant.ui.standard"
to
package="com.aurorasoftworks.quadrant.ui"
or put that activity inside
com.aurorasoftworks.quadrant.ui.standard
package.

Related

Application crashes when trying to start activity using intent via side navigation

please my app crashes whenever i click the navigation item to start activity. i Have tried all the solutions from similar questions in the last 6 hours to no avail. that includes registering the activity in manifest, changing intent (this,menu_profile.class); to (mainactivity.this, menu_profile.class); to `(getApplicationContext(), menu_profile.class);. googling permission (13) error to brought no solution.
snippet
else if (itemId == R.id.third) {
Intent intent = new Intent(getApplicationContext(), Menu_Profile.class);
startActivity(intent);
}
manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.majesty.adesanmi.viewpager_nav">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Menu_Profile"
android:label="DestinationActivity"/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</application>
</manifest>
Logcat error
06-16 09:46:56.913 2889-2889/? E/Trace: error opening trace file: Permission denied (13)
06-16 09:46:56.983 2889-2889/com.majesty.adesanmi.viewpager_nav E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
06-16 09:47:41.673 2889-2889/com.majesty.adesanmi.viewpager_nav E/AndroidRuntime: FATAL EXCEPTION: main
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.majesty.adesanmi.viewpager_nav/com.majesty.adesanmi.viewpager_nav.Menu_About}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1541)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
at android.app.Activity.startActivityForResult(Activity.java:3351)
at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79)
at android.app.Activity.startActivityForResult(Activity.java:3312)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859)
at android.app.Activity.startActivity(Activity.java:3522)
at android.app.Activity.startActivity(Activity.java:3490)
at com.majesty.adesanmi.viewpager_nav.MainActivity$2.onNavigationItemSelected(MainActivity.java:157)
at android.support.design.widget.NavigationView$1.onMenuItemSelected(NavigationView.java:156)
at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:822)
at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:156)
at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:969)
at android.support.design.internal.NavigationMenuPresenter$1.onClick(NavigationMenuPresenter.java:342)
at android.view.View.performClick(View.java:4084)
at android.view.View$PerformClick.run(View.java:16966)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
just remove intent filter from your menu profilr activity this from your Manifist file or replace this
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Menu_Profile"
android:label="DestinationActivity"/>
</application>

Android app with READ_SMS permission worked on emulator but not with physical device

I am creating an app with read_sms permission.it worked perfectly fine with emulator but when deployed on Samsung galaxy s5 with android 4.4.2 causing error.the app does not even start when tapped.it displays app isn't installed.
ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.project.searchandroid/.MainActivity } from null (pid=24876, uid=2000) requires android.permission.READ_SMS
ActivityManager: at android.os.Parcel.readException(Parcel.java:1465)
ActivityManager: at android.os.Parcel.readException(Parcel.java:1419)
ActivityManager: at android.app.ActivityManagerProxy.startActivityAsUser(ActivityManagerNative.java:2367)
ActivityManager: at com.android.commands.am.Am.runStart(Am.java:680)
[2015-03-24 19:07:47 - SearchAndroid] ActivityManager: at com.android.commands.am.Am.onRun(Am.java:270)
ActivityManager: at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
[2015-03-24 19:07:47 - SearchAndroid] ActivityManager: at com.android.commands.am.Am.main(Am.java:76)
ActivityManager: at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
ActivityManager: at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:301)
ActivityManager: at dalvik.system.NativeStart.main(Native Method)
Please help me. i have project to complete. Thnx.
here is my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.project.searchandroid"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.READ_SMS"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PreferenceActivity"
android:label="#string/app_name"/>
<activity
android:name=".FilterActivity"
android:label="#string/app_name"/>
<activity
android:name=".AboutActivity"
android:label="#string/app_name"
android:parentActivityName="com.project.searchandroid.MainActivity">
</activity>
</application>
</manifest>

error androidmanifest.xml

In my android application it crashes and display this message, and I added the activity in androidmanifest but same error !!
11-16 08:56:00.077: E/AndroidRuntime(622): FATAL EXCEPTION: main
11-16 08:56:00.077: E/AndroidRuntime(622): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.upnpexample/com.example.androidhive.CustomizedListView}; have you declared this activity in your AndroidManifest.xml?
EDITED
Androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.upnpexample"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"></uses- permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-sdk android:minSdkVersion="7"></uses-sdk>
<application android:icon="#drawable/appicon" android:label="#string/app_name" android:name=".UpnpControlApplication">
<activity android:name=".MainActivity" android:theme="#android:style/Theme.NoTitleBar" android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity>
<activity android:name=".BrowseActivity"
android:label="#string/app_name">
</activity>
<activity android:name=".BrowseServerActivity" android:label="#string/app_name"></activity>
<service android:name=".BrowserUpnpService"></service>
<activity android:label="#string/list_player" android:name=".EPGview"/>
<activity android:label="#string/list_player" android:name=".Playsimplevideo"/>
<activity android:label="#string/list_player" android:name=".Streaming"/>
<activity android:label="#string/list_player" android:name=".LazyAdapter"/>
<activity android:label="#string/list_player" android:name=".CustomizedListView"/>
</application>
EDIT 2
I put them in the same package and now it displays this errors
11-16 09:21:18.076: D/AndroidRuntime(710): Shutting down VM
11-16 09:21:18.076: W/dalvikvm(710): threadid=1: thread exiting with uncaught exception (group=0x40015560)
11-16 09:21:18.086: E/AndroidRuntime(710): FATAL EXCEPTION: main
11-16 09:21:18.086: E/AndroidRuntime(710): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.upnpexample/com.upnpexample.CustomizedListView}: java.lang.NullPointerException
i put them in the same package and now it displays this errors
11-16 09:21:18.076: D/AndroidRuntime(710): Shutting down VM
11-16 09:21:18.076: W/dalvikvm(710): threadid=1: thread exiting with uncaught exception (group=0x40015560)
11-16 09:21:18.086: E/AndroidRuntime(710): FATAL EXCEPTION: main
11-16 09:21:18.086: E/AndroidRuntime(710): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.upnpexample/com.upnpexample.CustomizedListView}: java.lang.NullPointerException
Change the package in class CustomizedListView from:
package com.example.androidhive;
to:
package com.upnpexample;

PhoneGap APK runs fine but crashes on each run after Google Play deployment

I have built an application for a large multicultural festival in my city that kicks off on Saturday. I've tweaked a lot of bugs in the iPhone version and we are waiting for Apple to approve it. I have taken that perfected version as the basis for the Android version.
The Android version looks and works great. I can run it on my Samsung Galaxy S II by either "Run as Android Application" in Eclipse or by uploading it to a server and downloading it into the phone. I can also email the app to myself and it works, too. I submitted it to the Google Play store and once it got into the wild (this is advertised on billboards, buses, everywhere) it crashes the minute it is opened.
I'm not really sure how to troubleshoot this when it works fine on the device before publication. I read about how it has to do with the MainActivity activity name, but everything looks like it lines up.
Error 1 [ClassNotFoundException in PathClassLoader.findClass()]:
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.honestapi.folk2011/com.honestapi.folk2011.Folklorama}:
java.lang.ClassNotFoundException: com.honestapi.folk2011.Folklorama in loader
dalvik.system.PathClassLoader[/data/app/com.honestapi.folk2011-1.apk]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1660)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1752)
at android.app.ActivityThread.access$1500(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:126)
at android.app.ActivityThread.main(ActivityThread.java:3997)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.honestapi.folk2011.Folklorama in loader dalvik.system.PathClassLoader[/data/app/com.honestapi.folk2011-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:251)
at java.lang.ClassLoader.loadClass(ClassLoader.java:548)
at java.lang.ClassLoader.loadClass(ClassLoader.java:508)
at android.app.Instrumentation.newActivity(Instrumentation.java:1022)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
Error 2 [ClassNotFoundException in BaseDexClassLoader.findClass()]:
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.honestapi.folk2011/com.honestapi.folk2011.Folklorama}:
java.lang.ClassNotFoundException: com.honestapi.folk2011.Folklorama
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1894)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4514)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.honestapi.folk2011.Folklorama
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1027)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1885)
Any help would be greatly appreciated! I am in quite the pickle.
Edit - Here is the AndroidManifest.xml from the bin folder
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" />
<supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:resizeable="false" android:anyDensity="true" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.CAMERA" />
<application android:icon="#drawable/ic_launcher" android:label="#string/app_name" android:theme="#style/AppTheme">
<activity android:name=".MainActivity" android:label="#string/title_activity_main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.zxing.client.android.CaptureActivity" android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden" android:theme="#android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="com.phonegap.plugins.barcodescanner.SCAN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name="com.google.zxing.client.android.encode.EncodeActivity" android:label="#string/share_name">
<intent-filter>
<action android:name="com.phonegap.plugins.barcodescanner.ENCODE"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
It turned out my main Java file was named "MainActivity.java" but it was being called as "Folklorama.java" throughout the project files. I renamed the file to Folklorama.java.

How to fix this classnotfound exception in Android?

I got the stack trace below in the Android developer account. There is just one occurrence of this error.
java.lang.RuntimeException: Unable to instantiate application com.mysite.myapp.TestApplication: java.lang.ClassNotFoundException: com.mysite.myapp.TestApplication in loader dalvik.system.PathClassLoader[/data/app-private/com.mysite.myapp-2.apk]
at android.app.LoadedApk.makeApplication(LoadedApk.java:466)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3268)
at android.app.ActivityThread.access$2200(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.myapp.myapp.TestApplication in loader dalvik.system.PathClassLoader[/data/app-private/com.mysite.myapp-2.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.app.Instrumentation.newApplication(Instrumentation.java:945)
at android.app.LoadedApk.makeApplication(LoadedApk.java:461)
... 11 more
In my manifest file, I have declared com.mysite.myapp.TestApplication.
My Manifest file looks like this:
<application
android:name="com.mysite.myapp.TestApplication"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/Theme.myapp" >
<activity
android:name="com.mysite.myapp.ActivityDashboard"
android:configChanges="orientation|keyboard"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
If your main home page is ActivityDashboard.java
insert as below or if TestApplication.java
replace .ActivityDashboard as .TestApplication in the activity tag
<package name="com.mysite.myapp"
<application
android:name="TestApplication"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/Theme.myapp" >
<activity android:name=".ActivityDashboard" android:configChanges="orientation|keyboard"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
......
</application>
android:name="com.mysite.myapp.ActivityDashboard"
Replace thr above in your manifest with the below.
android:name=".ActivityDashboard"
Alternatively:
android:name="com.mysite.myapp.TestApplication.ActivityDashboard"

Categories

Resources