Android Studio - Compiling option - android

I developed an android app with android studio selectiong the lowest androis os version. i tested the app on my samsung s4 and it works correctly, now i tested the same apk file on another device (LG g2) and when i open the app it close immediately. my app is very simple and i don't think to have used high version library, so i wanted to know if it was possible to compile my application for that specific device (LG g2) so that my app works on that phone (android 4.4.2). if not possible does someone know why that error?
this is manifest code
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.tommaso.progetto">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Related

Apk installs but won't start only on Android 4

My application works fine on Android 4, 5 and 6, when I plug devices to computer. But when I get .apk file from app/build/outputs/apk directory and install it directly, application crashes on Android 4 on start. Only on Android 4. Why? And how to fix it?
Here is my manifest file:
<manifest package="ru.pussy_penetrator.chgk"
xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".QuestionGridActivity"/>
<activity
android:name=".QuestionPagerActivity"/>
</application>
Disable the Instant Run and Build the APK. Instant Run uses the device cache to hot swap the changes you make in the project. Also it optimizes the code to run on the platform that your testing device has.
You can also generate Signed apk for distributing across all the supported Android versions

app neither installing not running on emulator

I have created My First Android Hello World on Android Studio . but when I run it on emulator , it is not running neither installing it on Emulator .. Every time is only shows session '' Error only in log .. i have done restart several times . no use ,
this is my emulator Setting
My Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.administrator.facebooklogin" >
<application
android:allowBackup="true"
android:icon="#mipmap/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>
</application>
</manifest>
I have changed the device and skins as well , but no use i have not found proper solution for session '' error .
Since you have just started, Explore Genymotion, a faster and better alternative to Android virtual devices for Android Development.

Android App not starting - Only on Galaxy S4

I'm developing a game on Android that has been running well over months on all devices I know of. But recently I noticed that S4 users typically uninstall the app right away, and finally someone with an S4 (jflte) wrote a review, stating that the app "does not start".
I cannot reproduce this behaviour in an AVD (related) and won't have an S4 at hand any time soon. Googling the issue, I found that this is not umcommon with S4's and might be related to SD-card installs. I did not find any solution though. My app uses OpenGL with android.opengl.GLSurfaceView.
Question is: What are my options to investigate the problem? I've seen the RTL option, but it seems to be some kind of premium thing. Disabling S4 support in the Play Store does not count as solution. I would love to have LogCat output of the startup attempts on an S4.
Here's my AndroidManifest, as far as relevant:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.orbs"
android:versionCode="24"
android:versionName="2.1"
android:installLocation="auto" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/orb_launcher"
android:label="#string/app_name"
android:name="orbs.OrbsApplication">
<activity
android:name="orbs.controller.MainMenuActivity"
android:screenOrientation="portrait"
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="orbs.controller.GameActivity"
android:screenOrientation="portrait"
android:label="#string/app_name" >
</activity>
<activity
android:name="orbs.SettingsActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<category android:name="android.intent.category.PREFERENCE" />
</intent-filter>
</activity>
</application>
Thanks in advance!
First thing is to try and get users to send error reports when a crash happens, but lets face it, most people won't do that.
So I would suggest looking into an automatic crash reporting system such as Crittercism.

Android app does not start (and is invisible!) on device

I have a strange problem with my Android app. When I start it from Netbeans, the app gets installed on my device (attached via USB). After that nothing happens. I also can't find the app anywhere on the device!! (no icon, no nothing).
Still I know the app has been installed, because under the android settings, where it says "Manage Applications" (or something) the app is now listed and I can uninstall it.
I've tried the whole procedure with a blank HelloWorld app, which worked fine. Here an icon got created o the device and the app was started correctly by NetBeans.
So I guess there is something wrong with my app causing it not to appear in the phone's launcher?
EDIT:
Here's the manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk android:minSdkVersion="4" />
<application
android:icon="#drawable/icon"
android:label="#string/app_name" android:debuggable="true">
</application>
you need to add below line in your Main activity in androidmanifest file
<activity android:label="#string/app_name"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

My apps will not install on device when downloaded from the Android Market

I am unable to install my app onto a device even when it is downloaded from the Android Market. How can this be possible? If it were signed incorrectly wouldn't the market not accept it? I have tried to install it by isolating various activities but none seem to work even when I reduce it to a simple hello world application. The app has a tab view, two being webviews [one includes a reload button] and one tab that allows a user to send an email to a submission page. Does anyone have any ideas as to what I am missing?
Thank you all very much in advance.
EDIT:
It's being downloaded on the LG Ally running 2.2.2 and my app runs fine on an 2.2 emulator. It is compiled with a min level of 4. Here is my AndroidManifest file
<?xml version="1.0" encoding="utf-8"?>
<application android:icon="#drawable/icon" android:label="#string/app_name" android:debuggable="false">
<activity android:name=".BrotipsTabs"
android:label="Brotips">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".TabWidget"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
</activity>
<activity android:name=".Random"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
</activity>
<activity android:name=".Sub"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
</activity>
<activity android:name=".BrotipsTabs" android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
</activity>
<meta-data android:name="com.mobclix.APPLICATION_ID" android:value="<Key>"/>
<activity android:name="com.mobclix.android.sdk.MobclixBrowserActivity" android:theme="#android:style/Theme.Translucent.NoTitleBar"/>
</application>
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
By not working I mean it refuses to install and claims it never did while an icon remains on the phone.
Do you have any previous versions of your app installed on your phone? If you have an apk that is signed with the debug signature (which eclipse uses when you push run) and try to install it from the market which is signed with an actual signature then it will fail due to the two signatures being different. The message that it shows you is different on different devices I've found. If you have any previous versions of your app installed you should uninstall them and try to install from the market again. You should be good to go.

Categories

Resources