Can't open APK file on mobile device after installing from PC - android

I've made an Android application using Eclipse. It has no errors, good to go, but I wanted to test it on my own phone first. I copied the APK file to my Samsung Galaxy S6 using an USB cable. Unplugged it, made sure the file version is not higher or later than my android version on my phone.
Used an APK installer app, and it's installed. It's at my files, and I can update it how many times I want. After updating, or installing it gives 2 buttons in the button. "Ready" and "Open". "Ready" is the only one clickable, and leaves the page. I can't open the apk-file. I've followed every tutorial but I just can't open it.
This is my Manifest code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.rodekruis"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
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=".BezoekActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.rodekruis.BezoekActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".AfspraakActivity"
android:label="#string/title_activity_afspraak" >
</activity>
<activity
android:name=".ContactActivity"
android:label="#string/title_activity_contact" >
</activity>
<activity
android:name=".MeningActivity"
android:label="#string/title_activity_mening" >
</activity>
<activity
android:name=".RouteActivity"
android:label="#string/title_activity_route" >
</activity>
<activity
android:name=".SpecialistenActivity"
android:label="#string/title_activity_specialisten" >
</activity>
<activity
android:name=".BWCActivity"
android:label="#string/title_activity_bwc" >
</activity>
<activity
android:name=".AgendaActivity"
android:label="#string/title_activity_agenda" >
</activity>
<activity
android:name=".InfoActivity"
android:label="#string/title_activity_informatie" >
</activity>
<activity
android:name=".VriendActivity"
android:label="#string/title_activity_vriend" >
</activity>
<activity
android:name=".FoldersActivity"
android:label="#string/title_activity_folders" >
</activity>
<activity
android:name=".NieuwsActivity"
android:label="#string/title_activity_nieuws">
</activity>
</application>
</manifest>
Does anybody knows why this is, or how I can solve it? If I need to add more things, feel free to ask. I'm struggling with this and really want it to work on my phone. Thanks in advance!

Activate USB debugging. It is easier.
Also:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.rodekruis"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
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=".BezoekActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.category.DEFAULT" />
<category android:name="com.example.rodekruis.BEZOEKACTIVITY" />
</intent-filter>
</activity>
<activity
android:name=".AfspraakActivity"
android:label="#string/title_activity_afspraak" >
</activity>
<activity
android:name=".ContactActivity"
android:label="#string/title_activity_contact" >
</activity>
<activity
android:name=".MeningActivity"
android:label="#string/title_activity_mening" >
</activity>
<activity
android:name=".RouteActivity"
android:label="#string/title_activity_route" >
</activity>
<activity
android:name=".SpecialistenActivity"
android:label="#string/title_activity_specialisten" >
</activity>
<activity
android:name=".BWCActivity"
android:label="#string/title_activity_bwc" >
</activity>
<activity
android:name=".AgendaActivity"
android:label="#string/title_activity_agenda" >
</activity>
<activity
android:name=".InfoActivity"
android:label="#string/title_activity_informatie" >
</activity>
<activity
android:name=".VriendActivity"
android:label="#string/title_activity_vriend" >
</activity>
<activity
android:name=".FoldersActivity"
android:label="#string/title_activity_folders" >
</activity>
<activity
android:name=".NieuwsActivity"
android:label="#string/title_activity_nieuws">
</activity>
</application>
</manifest>
You have to have a launcher defined. The rest have to be defined as you originally defined the first activity with default and the package name. The main activity(the first to launch) has to be defined with MAIN and LAUNCHER
EDIT:
OK, I screwed up. I updated it. Action cannot be the package name:
<action android:name="android.intent.category.DEFAULT" />
<category android:name="com.example.rodekruis.BEZOEKACTIVITY" />
You did it the other way around which is why it didnt work. You have to do the default and name for all the activities. The MainActivity was written correctly

Related

I can't see my app icon in my phone

I use Android Studio
I build the app and play in device.
but, in device's normal display(like when phone open state),
I can't see the icon
In device Setting, I find the app in application manager,
but I can't see in normal display
this is my androidmanifest.xml
<application
android:allowBackup="true"
android:icon="#drawable/imagebutton_on"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Activity.SplashActivity"
android:theme="#style/AppTheme"
android:icon="#drawable/imagebutton_on"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="roid.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I embrassed of that
please help me
this is my full android-manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.thewell_dev.fourscompany">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="#mipmap/imagebutton_on"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Activity.SplashActivity"
android:theme="#style/AppTheme"
android:icon="#mipmap/imagebutton_on"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="roid.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="example.com"></data>
<data android:scheme="http"></data>
<data android:pathPattern="/.*"></data>
</intent-filter>
</activity>
<activity android:name=".Activity.LoginActivity">
</activity>
<activity android:name=".Activity.JoinActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.MainActivity"
android:theme="#style/ListTheme"
android:icon="#mipmap/imagebutton_on"
>
</activity>
<activity android:name=".Activity.CompanyActivity"
android:theme="#style/CompanyTheme"
android:configChanges="orientation|keyboardHidden|screenLayout|screenSize"
>
</activity>
<activity android:name=".Activity.CardActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.CardListActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.CardPreviewActivity">
</activity>
<activity android:name=".Activity.ManagementActivity">
</activity>
<activity android:name=".Activity.BeaconActivity">
</activity>
<activity android:name=".Activity.CompanyCardActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.PreferencActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.FileListActivity">
</activity>
<activity android:name=".Activity.PasswordChangeActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.RemoveUserActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.ProvisionActivity">
</activity>
<activity android:name=".Activity.QuestionActivity">
</activity>
<activity android:name=".Activity.ExpandActivity">
</activity>
<activity android:name=".Activity.CardPrecaptureActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.BookMarkActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.FindPasswordActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.CardListDetailActivity">
</activity>
<activity android:name=".Activity.UploadCertificationActivity">
</activity>
<activity android:name=".Activity.UploadRewardActivity">
</activity>
<activity android:name=".Activity.OnOffProductActivity"
>
</activity>
<activity android:name=".Activity.OnOffCompanyActivity"
>
</activity>
</application>
</manifest>
App Icon should be placed in mipmap folder. Move your imagebutton_on in res\mipmap\ and Replace below code from application tag:
android:icon="#drawable/imagebutton_on">
With:
android:icon="#mipmap/imagebutton_on"
And resolve the following issue, as Markus Kauppinen mentioned:
<category android:name="roid.intent.category.LAUNCHER" />
To:
<category android:name="aroid.intent.category.LAUNCHER" />
Hope this helps.
Try by removing following lines from all activity tags
android:icon="#mipmap/imagebutton_on"
Keep it in only application tag.

Can't open APK file on smartphone

I've made an application in eclipse using android project. Now I installed that APK-file on my smartphone.
When I hit install, it just installs, it's fine. But then I get the option "Cancel", or "open". But I can't click on "Open".
Just nothing happens every time I try to open it. It's not with my other apps.
I can find it at "downloads", but I just can't open it. I can update and install it again countless times. Unknown sources in my settings is on.
Does anyone know this issue, and/or how to fix it?
Help would be appreciated.
Manifest code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.rodekruis"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<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=".BezoekActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.rodekruis.BezoekActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".AfspraakActivity"
android:label="#string/title_activity_afspraak" >
</activity>
<activity
android:name=".ContactActivity"
android:label="#string/title_activity_contact" >
</activity>
<activity
android:name=".MeningActivity"
android:label="#string/title_activity_mening" >
</activity>
<activity
android:name=".RouteActivity"
android:label="#string/title_activity_route" >
</activity>
<activity
android:name=".SpecialistenActivity"
android:label="#string/title_activity_specialisten" >
</activity>
<activity
android:name=".BWCActivity"
android:label="#string/title_activity_bwc" >
</activity>
<activity
android:name=".AgendaActivity"
android:label="#string/title_activity_agenda" >
</activity>
<activity
android:name=".InfoActivity"
android:label="#string/title_activity_informatie" >
</activity>
<activity
android:name=".VriendActivity"
android:label="#string/title_activity_vriend" >
</activity>
<activity
android:name=".FoldersActivity"
android:label="#string/title_activity_folders" >
</activity>
<activity
android:name=".NieuwsActivity"
android:label="#string/title_activity_nieuws">
</activity>
</application>
</manifest>
Have you been able to launch it through ADB directly in Android Studio ?
You might want to do it this way during your implementation, it is much faster to build and test.
Just enable the developer mode in the settings and the "usb debugging" in the new menu that appeared (also in settings). You can now connect your phone to your computer and enjoy the simplicity of creating apps on Android.
Register your launchable Activity in AndroidManifest.xml like this-
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<!--______________Activities______________-->
<activity
android:name=".MainActivity" //launchable activity
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Hope this will help you.

Google Play still giving me zero devices

I'm trying to upload an update of my application in the Google Play store but I couldn't get more than 0 devices. I've tried to delete the permissions and still no luck. This is my manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.compan.st"
android:versionCode="9"
android:versionName="#string/app_verion" >
<!-- PERMISSIONS -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:name="com.compan.st.app.ApplicationExt"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#android:style/Theme.Holo.Light" >
<activity
android:name=".activity.LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Holo.Light.NoActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".activity.MainMenuActivity"
android:label="#string/MainMenuStrings"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activity.AcademicRecordActivity"
android:label="#string/ACrecord"
android:parentActivityName=".activity.MainMenuActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activity.SemesterActivity"
android:label="#string/Semester"
android:parentActivityName=".activity.AcademicRecordActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activity.AboutUserActivity"
android:label="#string/Aboutuser"
android:parentActivityName=".activity.MainMenuActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activity.RewardsActivity"
android:label="#string/Rewards"
android:parentActivityName=".activity.MainMenuActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activity.LoansActiviry"
android:label="#string/Loans"
android:parentActivityName=".activity.MainMenuActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activity.RequestsActivity"
android:label="#string/Requests"
android:parentActivityName=".activity.MainMenuActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activity.Preferences"
android:label="#string/setting"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".activity.AboutActivity"
android:label="#string/about"
android:parentActivityName=".activity.Preferences"
android:screenOrientation="portrait" >
</activity>
<receiver android:name="com.compan.st.activity.IntentReceiver" />
<activity
android:name="com.google.android.apps.iosched.ui.phone.ScheduleActivity"
android:theme="#style/Theme.IOSched" >
</activity>
<activity android:name=".activity.CourseInfoActivity" >
</activity>
<activity
android:name=".activity.ASchedule"
android:label="#string/schedule" >
</activity>
</application>
The previous version was compatible with most of devices "it was working with api 8".
Problem fixed. it turns out one of the JARs that are Java project I'm using in my Android project has libraries inside a folder called lib so I just move it to a new folder called libs then export the JAR, put it in my Android project then export the APK.

exported apk showing activities when installed

I have exported an app with 3 activities (main, splash and another activity called "about") to an apk file. It works fine when tested on the emulator. After uploading to the Play Store and then downloading to my own phone, it installs fine on my phone. Good so far. However, the apk doesn't appear packaged - it's showing the separate activities and not starting with the splash screen as it did in the emulator. What could be the problem? It exported with no errors. When I was exporting, I gave the apk a name that was different than the package name in the manifest. Would this cause the problem? Here is the manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.spinner"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" >
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".AboutActivity"
android:label="#string/title_activity_about" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Thank you for looking.
This intent-filter
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
tells Android launcher app to show icon associated with Activity this filter is attached to on its Launcher screen. When corresponding icon is tapped by user, launcher app starts that activity and your code is executed. You usually want one entry point in your application so edit your Manifest file and ensure only one Activity element uses it. In your case, I guess leave it for SplashActivity and remove from others. It should look like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.spinner"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" >
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
</activity>
<activity
android:name=".AboutActivity"
android:label="#string/title_activity_about" >
</activity>
</application>
</manifest>
I'd also get rid of android:label from <activity> elements (just leave for <application>)

Android application upload error

i'm having a hard time uploading my upgraded version to the developers console. I've incremented the versionCode and the versionName and i used the same details to exporting the apk file as i did before.
when i try to upload the new file all it says that there's a unexpected error and asks me to choose another file.
does anyone have any hints or even know how to fix this error? would the problem be in my manifest?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kev.harris"
android:versionCode="2"
android:versionName="1.1" >
<uses-sdk android:minSdkVersion="7" />
<application
android:icon="#drawable/man21"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar"
android:debuggable="false">
<activity
android:name=".AssignmentActivity"
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=".MainMenu"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="kev.harris.MAINMENU" />
<category android:name="android.intent.category.DEFAULT" />
<!-- makes it so that the code is recognised but is to run in the background -->
</intent-filter>
</activity>
<activity
android:name=".MainGame"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="kev.harris.MainGame" />
<category android:name="android.intent.category.DEFAULT" />
<!-- makes it so that the code is recognised but is to run in the background -->
</intent-filter>
</activity>
<activity
android:name=".Savefile"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- saving stuff -->
</activity>
<activity
android:name=".Continues"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="kev.harris.CONTINUES" />
<category android:name="android.intent.category.DEFAULT" />
<!-- makes it so that the code is recognised but is to run in the background -->
</intent-filter>
<!-- continuing -->
</activity>
<activity
android:name=".Dead"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".NewGame"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- used for the choice between male and female -->
</activity>
<activity
android:name=".Male"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for choosing the standard or custom picture -->
</activity>
<activity
android:name=".CMPicture"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the male custom picture -->
</activity>
<activity
android:name=".MPicture"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the male normal picture -->
</activity>
<activity
android:name=".Female"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the female choice of picture -->
</activity>
<activity
android:name=".CfPicture"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the female custom picture -->
</activity>
<activity
android:name=".FPicture"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the female normal picture -->
</activity>
</application>
R you including .apk extension with your file name.When you are exporting.

Categories

Resources