Releasing the android app - android

This question is related to the releasing the app to app store.
I am getting this error in commend line.
error= ERROR getting 'android:name' attribute: attribute is not an integer value
actually I am launching the app, but its showing the error in commend line.
Edit:
here is my Manifest.xml file code
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="17" />
<application
android:name="mobile.briltime.brilnet.SdkDemoLowLevelApp"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:label="#string/app_name"
android:name="mobile.briltime.brilnet.SplaseScreen"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="mobile.briltime.brilnet.MainActivity"
android:screenOrientation="portrait"></activity>
<activity android:name="mobile.briltime.brilnet.LoginManual"
android:screenOrientation="portrait"></activity>
<activity android:name="mobile.briltime.brilnet.AnimationStackedFrames"
android:screenOrientation="portrait"></activity>
<activity android:name="mobile.briltime.brilnet.Login"
android:screenOrientation="portrait"></activity>
<activity android:name="mobile.briltime.brilnet.MyFriendListActivity"
android:screenOrientation="portrait"></activity>
<provider
android:name="com.c2call.sdk.pub.db.provider.C2CallContentProvider"
android:authorities="mobile.briltime.brilnet.content"
android:exported="true"
android:grantUriPermissions="true" >
<grant-uri-permission android:pathPattern=".*" />
</provider>
</application>

thanks for your contribution, finally i solved the problem.
Simply I delete the screen orientation from the manifest file and now its working.

My guess is that you have your android:name attribute hardcoded. Change it to a string resource.
Example:
android:name = "MyAppName"
to
android:name = "#string/app_name"
with strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">MyAppName</string>
</resources>
I guessed this (you didn't give us enough information to do more) because the resource ids in Android are ints, generated by aapt.
More about the Manifest and String Resources.
I don't know why that should be an issue to the Playstore though...

Related

Facebook api invalid app iD

I have some problem with facebook SKD. I get invalid app ID when I am trying to login. Can you please help me figure out what the problem is?
My facebook app looks like this:
Manifest:
<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="com.facebook.FacebookActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="70208723325****" />
</application>
In case anyone has this problem, I fixed it with not putting the appId value directly in the manifest file. Instead you should put it in strings and then in manifest you put
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
It's strange but it works for me.
1.Try to change the facebook status and review as yes.
2.Enter the Key hash value (Setting -> keyhash).

Manifest in android studio does not work

I have some problems with manifest in android java programming. I do not know how to fix it. Any help is appreciated.
It says The processing instructions goal match........ is not allowed. And in the beginning: Serious: null = SERIOUS : null – .
And: Error:Cannot read packageName from C:\Users\arnpet\AndroidStudioProjects\UltimateHogskoleprovet\app\src\main\AndroidManifest.xml
Here is the manifext file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.arnpet.ultimatehogskoleprovet" >
<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=".pageBeforeAction"
android:label="#string/title_activity_page_before_action" >
</activity>
<activity
android:name=".toppLista"
android:label="#string/title_activity_topp_lista" >
</activity>
<activity
android:name=".information"
android:label="#string/title_activity_information" >
</activity>
<activity
android:name=".GameAction"
android:label="#string/title_activity_game_action" >
</activity>
<activity
android:name=".QuestionBox"
android:label="#string/title_activity_question_box" >
</activity>
</application>
It seems like your AndroidManifest.xml is malformed. Its missing the opening & closing tags.
Try to create a new project and look at its AndroidManifest.xml.
The beginning of an Android Manifest usually looks like:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz"
android:versionCode="229"
android:versionName="2.2.9" >
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="15" />
<uses-permission ... />
<application>...</application>
</manifest>
Inside your <manifest> tag set attribute package = "[your package]".
First of all: Is this the whole AndroidManifest.xml? Because you missing the manifest tag. In this tag, there is a attribute package defining the packagename of your app.
See the documentation for more information and example of a complete manifest file.

Facebook SDK instruction not making sense about app id

I have taken a picture of the Facebook instruction below. What is wrong with it? My app keeps crashing with exception concerning ApplicationId should not be null. But I have added my app id as <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/> in the manifest; that is after adding it as a string in the strings.xml resource as <string name="facebook_app_id">0000000000</string>
So I figure the instructions is wrong because it does not say which uses-permission to add and it says to call the string resource key com.facebook.sdk.ApplicationId with value Facebook_app_id. Here is the link https://developers.facebook.com/docs/android/getting-started#eclipse
Quite simply
1.) Create app on Facebook, get the app_id that you will subsequently use to attach to your app.
2.) Define your applicationId in the AndroidManifest.xml like this:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
under <application android:label="#string/app_name".... tag
where app_id is a string within your strings.xml.
Example (Facebook Sample application):
<application android:label="#string/app_name"
android:icon="#drawable/icon"
android:theme="#android:style/Theme.NoTitleBar"
>
<activity android:name=".HelloFacebookSampleActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
</application>
Note the value added under the <application> tag
and in strings.xml (MAKE SURE TO DO THIS)
<string name="app_id">xxxxxxxxxxxx</string>
3.) Set permissions in manifest
<uses-permission android:name="android.permission.INTERNET"/>
This is an android requirement, so the app can access the internet.
So with permissions the above manifest will look like
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="#string/app_name"
android:icon="#drawable/icon"
android:theme="#android:style/Theme.NoTitleBar"
>
<activity android:name=".HelloFacebookSampleActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
</application>
I had the same problem. And here is how I solved it — I think. At least after doing these things, the problem went away.
in strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
….
<string name="com.facebook.sdk.ApplicationId">facebook_app_id</string>
<string name="facebook_app_id">111111111</string>
….
</resources>
in manifest
<application
… >
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
</application>
</manifest>
Notice there are two entries in the strings.xml file.

Duplicate attribute error in AndroidMainfest.xml while adding a new Activity

I was making a simple text field and 'send' button to display whatever the user typed in the text field. The program is completely illustrated in the Android training tutorials by android.com.
Whenever I'm adding the Activity DisplayMessageActivity, I'm getting "Duplicate attribute" as an error. Here's the code:
<application
<activity android.name="DroidStart"/>
<activity
android:name="com.start.droidstart.DisplayMessageActivity"
android:label="#string/title_activity_droid" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Update: I fixed the problems that were pointed out, but I'm still getting the error. Here's my current AndroidMainfest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.start.droidstart"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="DroidStart"
android:name="com.start.droidstart.DisplayMessageActivity"
android:label="#string/title_activity_droid" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
The error looks like this
Error parsing XML; duplicate attribute. type Android AAPT problem.
My problem was the tools:replace duplicated.
Fixed easy:
tools:replace="android:label,android:theme">
You have at least two errors:
Be sure to close your <application> tag.
Use android:name, not android.name.
So the first 3 lines should change from:
<application
<activity android.name="DroidStart"/>
to
<application>
<activity android:name="DroidStart"/>
Update:
In your updated code, you have:
<activity
android:name="DroidStart"
android:name="com.start.droidstart.DisplayMessageActivity"
You are using android:name twice, which is why you are getting this error. You should probably change this to:
<activity
android:name=".DisplayMessageActivity"
assuming DisplayMessageActivity is the class name of the Activity you which to refer to.
Last, you forgot your manifest end tag: you should have </manifest> at the very end of your file.
change
android.name
into
android:name
on the first line...
For instantapp project also check that you have
xmlns:android = "http://schemas.android.com/apk/res/android"
in app AndroidManifest.xml in manifest tag.
use
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.start.droidstart"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/title_activity_droid" >
<activity
android:name=".DisplayMessageActivity"
android:label="#string/title_activity_droid" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".DroidStart"/>
</application>
</manifest>
instead of
<application
<activity android.name="DroidStart"/>
you are using "android.name" instead of "android:name" for declaring activity in manifest and also close first application tag as <application>

Error when uploading .apk to google play : this file is invalid: error getting 'android name' attribute for service: attribute is not a string value

I'm uploading my draft live wallpaper .apk file to google play but I got this error:
this file is invalid: error getting 'android name' attribute for service: attribute is not a string value
I have tested in my emulator + real device and everything works fine.
I signed the apk file before uploading also.
Some of the online resources told me that this problem occurs because of the manifest.xml, but I still cant find the problem..
Here is my manifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.wallpaper"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.software.live_wallpaper" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity android:name="com.test.wallpaper.SplashActivity"
android:label="#string/app_name" android:configChanges="keyboardHidden"
android:windowSoftInputMode="adjustPan" android:launchMode="singleTop"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:permission="android.permission.BIND_WALLPAPER"
android:name = "#string/app_name"
android:label = "#string/app_name"
android:icon = "#drawable/icon"
>
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper" android:resource="#xml/wallpaper"/>
</service>
<activity
android:label = "Settings"
android:name = "Settings"
android:theme = "#android:style/Theme.Black"
android:exported = "true">
</activity>
<activity
android:name = "GalleryPreference"
android:label = "GalleryPreference"
android:theme = "#android:style/Theme.Black"
android:exported = "true"
/>
<activity
android:name = "GalleryActivity"
android:label = "GalleryActivity"
android:exported = "true"
/>
<service android:name = "com.test.wallpaper.AdapterService" android:enabled="true" android:exported="true"/>
</application>
</manifest>
Any thoughts ideas or suggestions are appreciated!
Thanks,
Binbon
The first service in your manifest is defining the android:name attribute to be "#string/app_name". According to the Android docs, this must be a fully qualified class name, like the service definition further down in the manifest. I'm guessing the string "app_name" is not a fully qualified class name.
in my case it was "\n" in the app_name string. That was wrong.

Categories

Resources