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.
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>
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.
I am working on this class : UserManager
public int getUserCount ()
Return the number of users currently created on the device.
My code is:
UserManager um = (UserManager) getSystemService(USER_SERVICE);
int count = um.getUserCount();
Log.i("count",""+count);
It produce error like this:
Caused by: java.lang.SecurityException: You need MANAGE_USERS permission to: query users
at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.os.IUserManager$Stub$Proxy.getUsers(IUserManager.java:321)
at android.os.UserManager.getUsers(UserManager.java:198)
at android.os.UserManager.getUserCount(UserManager.java:186)
at com.example.multiusertest.MainActivity.onCreate(MainActivity.java:52)
at android.app.Activity.performCreate(Activity.java:5104)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
I already added this permission manually in Manifest file. Does anyone know why it is produce.
Manifest File:
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.MANAGE_USERS"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.multiusertest.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>
</application>
The MANAGE_USERS has a protectionlevel of signature|system, which means that the application has to be signed with the platform key. See this thread on XDA
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;
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"