My application launches well both on Nexus 7 and Nook Tablet, but doesn't start on Kindle Fire with the following error:
Error: Activity class {com.js.pathoflight/com.js.pathoflight.JSNativeActivity} does not exist.
Here is my manifest complete:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.js.pathoflight"
android:versionCode="3"
android:versionName="0.8.3">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:allowBackup="true"
android:hasCode="true" >
<activity android:name=".JSNativeActivity"
android:label="#string/app_name"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<meta-data android:name="android.app.lib_name"
android:value="PathOfLight" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
It seems like a device issue, but I have another (similar) application which runs on the same device well.
How can I solve it?
The real problem was that there were another application with the same package name on device (I tried a sample and gave it my real app package name)! When I removed it everything became working right!
Related
<-- I m getting this fatal error which occurred while trying to upload pictures for my app in the android studio.please help get rid of this error.whats the best solution? the error is: Unable to find explicit activity class {}; have you declared this activity in your AndroidManifest.xml -->>
----------
----------
: Unable to find explicit activity class {}; have you declared this
activity in your AndroidManifest.
<?XML version="1.0" encoding="utf-8"?>
<manifest XML ns:android="http://schemas.android.com/apk/res/android"
package="com.parse.starter" >
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-sdk
android:minSdkVersion="15"
android:maxSdkVersion="23"/>
<application
android:name=".StarterApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.parse.APPLICATION_ID"
android:value="#string/parse_app_id" />
<meta-data
android:name="com.parse.CLIENT_KEY"
android:value="#string/parse_client_key" />
<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>
</application>
</manifest>
You have to check a package where MainActivity is placed. It should be com.parse.starter. It seems MainActivity is in other place and you are getting an exception.
This can happen when you say copy and paste an activity instead of adding it via Android Studio. Basically it just means you'll need to add this line to your AndroidManifest.xml:
<activity android:name=".your-activity-class-name"></activity>
I'm not entirely sure how or why this is happening, but when I install my app, There are 2 apks that are installed. They have the same name and they have the same icon. One (top right, circled in red) force closes and the other (bottom left, circled in yellow) works just fine. But I dont want 2, only 1. Below is my manifest as Im sure that is where the issue is happening.
EDIT: I believe it has something to do with the servicestarter activity but I'm not sure what.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="bladebeat.pro.swipeup" >
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application tools:replace="android:icon , android:theme"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" >
<activity
android:name=".ServiceStarter">
<intent-filter>
<action android:name="android.intent.action.ASSIST"></action>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity>
<activity android:name=".HomeActivity"></activity>
<service android:name=".Servers.SearchManager"></service>
</application>
</manifest>
Do this in your manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="bladebeat.pro.swipeup"
android:versionCode="1"
android:versionName="1.0" >
Android Studio builds two applications for the same project simultaenously
This was the problem. It actually had nothing to do with my Manifest and everything to do with my dependencies manifest. Problem solved though it should not have happened in the first place.
I'm trying to do some GCM notifications on Android. I've come as far as having something happen on the device.
NotificationService is throwing the following exception:
12-11 16:02:19.650 202-380/? E/NotificationService﹕ Ignoring notification with icon==0: Notification(contentView=org.***.**.reciever/0x1090098 vibrate=null,sound=null,defaults=0x0,flags=0x0)
Here is my manifest for reference:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.***.**.reciever"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<permission android:name="org.***.**.reciever.permission.C2D_MESSAGE"
android:protectionLevel="signature"/>
<uses-permission android:name="org.***.**.reciever.permission.C2D_MESSAGE" />
<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"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/***"
android:name=".***Application" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="org.***.**.reciever.MapActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="util.GcmBroadcastReciever"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="org.***.**.reciever" />
</intent-filter>
</receiver>
<service android:name="util.GcmIntentService" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="***"/>
</application>
All the *. are just the masked package name, they are all the same.
Any idea what I'm doing wrong?
Also, is the notification supposed to pop up on the device without any extra code or does the app have to ask the OS to show a notification on the screen when the GCM push arrives? I think i read something about Android doing this part differently from iOS.
Figured it out, it's not the actual push message that's causing the issue as i thought. So i was barking up the wrong tree for a couple hours.
It turns out it was the actual notification that had an issue because it was demo code from Google >.<
Replaced with proper code -> working.
Thanks for your time!
When Im starting my AVD emulator from within Android studio the list of devices in the emuator shows that some of my devices are not compatible with the current project.
It doesn´t show what is not compatible. Is there any way to get to know that?
My first guess was conflicting API versions. But that seems not to be the case sice several AVD:s have the same api settings and some are compatible and others not.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.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>
<service
android:name=".SetLocation"
android:label="SetLocation"/>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
</manifest>
And a screenshot of the list:
maybe if your applications are written for lover API version that device that you will use for testing. Can you run the application in emulator?
I am developing some app for android which worked well untill this evening.
However the app is working well in emulator but on Archos 80 G9 tablet with android 3.2.80 I got this error
The application Package installer (process com.android.packageinstaller) has stopped unexpectedly. Please try again.
Also here is my manifest XML
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="oni.dani"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="13"
/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:debuggable="true"
>
<activity
android:label="#string/app_name"
android:screenOrientation="portrait"
android:name="com.android.onidani.Dashboard" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.android.onidani.KlasaPrikazBaze"></activity>
<activity android:name="com.android.onidani.Dashboard"></activity>
<activity android:name="com.android.onidani.OniDaniActivity"></activity>
</application>
</manifest>
This error is occuring because you have declared your Dashboard activity twice.
<activity android:name="com.android.onidani.Dashboard"></activity>
You should add permission declaration in your manifest file. E.g
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
error: 'unfortunately package installer has stopped'. This happens when application needs permissions like location, phone call, Read external storage, write external storage etc. If permission is not defined in the manifest file then i get this kind of error message.
Add permission in manifest file according to your need
i need read/write file so i added below permission (outside of application)
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
in my situation i was passing empty array to requestPermissions. so check if your array is'not empty (String[] permissions)