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;
Related
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>
hellow
i am trying to integrate the payment gateway of stripe and i am getting this error.
My Menifest file is as below:
manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.saubhagyam.paymentstripeintegration">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
and my logcat is:
05-03 18:08:45.184 3425-3425/? D/dalvikvm: Late-enabling CheckJNI
05-03 18:08:45.264 3425-3425/com.example.saubhagyam.paymentstripeintegration D/AndroidRuntime: Shutting down VM
05-03 18:08:45.264 3425-3425/com.example.saubhagyam.paymentstripeintegration W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x94cabb20)
05-03 18:13:45.394 3425-3425/? I/Process: Sending signal. PID: 3425 SIG: 9
I have changed the whole way of implementing by integrating the stripe input method so it is giving me the inbuilt functionality and i cna use it sucessfully.
Thanks.
i do everything, research every but still not working.
i read many page from here but not :(
Error logs:
11-18 10:25:46.743: D/AndroidRuntime(24336): Shutting down VM
11-18 10:25:46.743: W/dalvikvm(24336): threadid=1: thread exiting with uncaught exception (group=0x4001d578)
11-18 10:25:46.873: E/AndroidRuntime(24336): FATAL EXCEPTION: main
11-18 10:25:46.873: E/AndroidRuntime(24336): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gmap/com.example.gmap.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
11-18 10:25:46.873: E/AndroidRuntime(24336): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)
11-18 10:25:46.873: E/AndroidRuntime(24336): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
11-18 10:25:46.873: E/AndroidRuntime(24336): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
11-18 10:25:46.873: E/AndroidRuntime(24336): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
11-18 10:25:46.873: E/AndroidRuntime(24336): at android.os.Handler.dispatchMessage(Handler.java:99)
11-18 10:25:46.873: E/AndroidRuntime(24336): at android.os.Looper.loop(Looper.java:138)
11-18 10:25:46.873: E/AndroidRuntime(24336): at android.app.ActivityThread.main(ActivityThread.java:3701)
11-18 10:25:46.873: E/AndroidRuntime(24336): at java.lang.reflect.Method.invokeNative(Native Method)
11-18 10:25:46.873: E/AndroidRuntime(24336): at java.lang.reflect.Method.invoke(Method.java:507)
Main Activity:
package com.example.gmap;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.gmap"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="17" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.gmap.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>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDq-Xosuk1Wzyw9WJ4bGjjE6XIhD90QNuA"/>
</application>
</manifest>
and main xml:
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>
Please any body help meeee.
Change this
public class MainActivity extends Activity {
to
public class MainActivity extends FragmentActivity {
You need the below
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
In application tag its outside the tag
I got this error when the one of the permissions were missing in the AndroidManifest.xml file.
adding the following permission solved the problem:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Remove Demo Map application from your phone. Then will be work fine. That works for me.
when I try to run my app i get this error on LogCat:
08-23 17:32:01.700: E/AndroidRuntime(4518): FATAL EXCEPTION: main
08-23 17:32:01.700: E/AndroidRuntime(4518): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.app.myapp/com.library.core.presentation.SessionActivity}: java.lang.NullPointerException
08-23 17:32:01.700: E/AndroidRuntime(4518): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
08-23 17:32:01.700: E/AndroidRuntime(4518): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
the problem appears when i touch on a list item, corresponding to this Intent:
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id)
{
Intent sessionIntent = new Intent(view.getContext(), SessionActivity.class);
//sessionIntent.putExtras(bundle);
startActivity(sessionIntent);
}
SessionActivity is a class contained in a library project that i have to use for this app.
My Manifest file is this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.myapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="10" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.rdp.rdp_prova.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="com.library.core.presentation.SessionActivity" />
</application>
</manifest>
what's wrong?
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.