The application works well before zipaligned it.
After signing , the app can't install on my phone or tablets.
I uploaded it to playstore .
It doesn't show error but supported devices shows 0.
Is there any problem ?
Here is manifest.xml.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.emapps.easystudy"
android:versionCode="1"
android:versionName="0.6" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:name="android.hardware.screen.portraits" />
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".StartActivity"
android:label="#string/app_name"
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=".AwardsGrid"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".AwardsGreyGrid"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="screenslide.ScreenSlideActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".MainActivity"
android:screenOrientation="portrait" >
</activity>
<receiver android:name=".Notificationmassage" >
</receiver>
<receiver android:name=".StudyingNotification" >
</receiver>
<activity
android:name=".Setting"
android:label="#string/title_activity_setting"
android:screenOrientation="portrait" >
</activity>
</application>
</manifest>
If you are using the IDE "build signed apk" GUI feature you do not need to zipalign because that last step will be done by the IDE.
If you use the command-line these are the steps: Signing manually
Zipalign
Caution: zipalign must only be performed after the .apk file has been
signed with your private key. If you perform zipalign before signing,
then the signing procedure will undo the alignment. Also, do not make
alterations to the aligned package. Alterations to the archive, such
as renaming or deleting entries, will potentially disrupt the
alignment of the modified entry and all later entries. And any files
added to an "aligned" archive will not be aligned.
Related
I downloaded google's sample in app purchase app and renamed the package to "com.iap.android.trivialdrivesample" wherever it appeared in AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.iap.android.trivialdrivesample"
android:versionCode="3"
android:versionName="1.3" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<!-- VERY IMPORTANT! Don't forget this permission, or in-app billing won't work. -->
<uses-permission android:name="com.android.vending.BILLING" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.iap.android.trivialdrivesample.MainActivity"
android:label="#string/title_activity_main"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Uploading the apk into google play shows the error "cannot use package name com.example". I expanded all my folders in android studio and don't see any packages starting with "com.example". How can I list them from the command line to make sure?
I got this error: You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play. Yet android:debuggable="false" is in my application tag.
Manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="icykum.JasonSafaiyeh.cocg"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="19" />
<application
android:debuggable="false"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="icykum.JasonSafaiyeh.cocg.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="icykum.JasonSafaiyeh.cocg.troopScreen"
android:label="#string/title_activity_troop_screen" >
</activity>
<activity
android:name="icykum.JasonSafaiyeh.cocg.defenseScreen"
android:label="#string/title_activity_defense_screen" >
</activity>
<activity
android:name="icykum.JasonSafaiyeh.cocg.resourceScreen"
android:label="#string/title_activity_resource_screen" >
</activity>
<activity
android:name="icykum.JasonSafaiyeh.cocg.armyScreen"
android:label="#string/title_activity_army_screen" >
</activity>
<activity
android:name="icykum.JasonSafaiyeh.cocg.otherScreen"
android:label="#string/title_activity_other_screen" >
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
You have to create a new Keystore first.
For Android Studio: Build > Generate Signed APK > Create new keystore
For Eclipse : Android Tools > Export Signed Application Package > Create new keystore
After that compile it and you are done.
I made my android application and tested it on the AVD but when I want to install it on my phone, I get "application not installed"
what could cause this problem??
here is the Manifest.xml, I don't see any thing weird in it !!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dashboard_our"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<permission
android:name="com.example.dashboard_our.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar" >
<activity
android:name="com.example.dashboard_our.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.example.dashboard_our.Hotels"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Restaurants"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.About"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.PrayTime"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Airports"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Currency_convert"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Translator"
android:label="#string/title_activity_translate" >
</activity>
<activity
android:name="com.example.dashboard_our.WeatherActivity"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.PlaceDetailsActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name=".PlaceDetails" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.dashboard_our.Todo"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Ocr"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.TodoDetailActivity"
android:label="#string/app_name" >
</activity>
<provider
android:name=".contentprovider.MyTodoContentProvider"
android:authorities="de.vogella.android.todos.contentprovider" >
</provider>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="API-KEY" />
</application>
</manifest>
any error from a DDMS? also you can try looking for .apk file from your project source and installing the app into the device.
Did you check "allow installation from non market applications" in your phone settings?
Did you remove an SD card around the time of installation?
Check if you have declared Main Activity twice inside AndroidManifest.xml. Delete one.
Another solution is if you haven't signed your app, you need to sign it. As the docs say All applications must be signed. The system will not install an application on an emulator or a device if it is not signed. Go here for more information: Android App Signing
I solved it, the problem was in my phone, I had to format my phone in order to work
I read this:
Error in AndroidManifest.xml "must have a minimum of 2 segments" but there is no solution.
Its happen after I change the name of the project by refactor->rename (instead com.example.my app to myapp only) and after that I change the name also in the manifest.
Here is the code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="save_money"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="save_money.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="save_money.Article"
android:label="#string/title_activity_article" >
</activity>
<activity
android:name="save_money.HashmalActivity"
android:label="#string/title_activity_hashmal" >
</activity>
<activity
android:name="save_money.ImageAdapter"
android:label="a" >
</activity>
<activity
android:name="save_money.SavedItems"
android:label="פריטים שמורים" >
</activity>
<activity
android:name="save_money.Screen2HashmalActivity"
android:label="עלות צריכה" >
</activity>
<activity
android:name="save_money.SelectArticle"
android:label="בחר מאמר" >
</activity>
</application>
</manifest>
What it means is the package declaration in your manifest must have at least two portions separated by a period (.). Instead of just saying package="save_money", change it to package="com.save_money". That should remove your error. Likewise, everywhere you specify the name of an activity, you also need to update it there. Best of luck!
My guess is you need to have a minimum of 2 segments for your package name.
So instead of package="save_money Try package="me.save_money" or whatever you want.
I create an Android Application on eclipse , when i want to run it on the Emulator I get The message saying
MyApplicationName.apk installed on device
So normally every thing fine.
But when i want to start my application i did not find it's icon.
And when i go to parametres then manage applications i find it there.
Can anyone tell me why i am not able to find the application's icon on the Emulator ?
here is the manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.enis.testandroid"
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=".MainActivity"
android:label="#string/title_activity_main" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="MainActivity" />
</activity>
</application>
You have missed to add a Launcher in your Manifest file,
<application
android:icon="#drawable/download" <!-- Check this one -->
android:label="#string/app_name" >
<activity
android:name=".abc"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <!-- Check this one -->
</intent-filter>
</activity>
<activity android:name="abc" >
</activity>
<activity android:name="def" >
</activity>
</application>
<application
android:name="com.x.y.z"
android:icon="#drawable/ic_launcher"
android:label="#android:string/abc" >
In manifest, make changes according to your drawable folder icon. Also make sure to use small case for drawable.