1

I have an application for my company and only I work on it. It has a WebView in itself and some few other options.

When I install it from Android Studio (debug/run mode) it starts OK and works OK. But, when I create an APK using my old keystore .JKS file and I put it on a remote server and download that APK again, on my or any other device, whether the app was previously installed or not, it just crashes at the start, just 1-2 seconds after I tap on it.

I can post some of my code from my only and single activity - MainActivity, but I need to change alots of stuff in it because, as said, its for a private company where I work.

This is my AndroidManifest (don't mind the META for Google Maps):

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="some.namespace.not"
    android:versionCode="1"
    android:versionName="1.5.7" >

    <uses-permission android:name="android.permission." />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_APN_SETTINGS" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <!-- <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> // -->
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.DELETE_PACKAGES" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <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.CAMERA" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:logo="@mipmap/ic_launcher"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="@string/google_maps_key" />
    </application>

</manifest>

When I debug it or anything else, I get no errors, nor even if it throws anything when I debug it on my device... NOTHING!

MainActivity.java: could not post it here on SO, so it's here:

https://gist.github.com/anonymous/5d2fa1ad1c44b3788a56

Please help.

PS Could it be that I have lost or mixed my keystore keys?


EDIT 1: I know it's all messed up - I am a beginner with Android dev.

  • http://stackoverflow.com/questions/9081877/how-to-debug-apk-signed-for-release – zec Aug 13 '15 at 17:47
  • Could you include the logcat messages - i.e. what's causing the crash? Besides are you using any Google APIs - they are usually signed by keystore signature + package name. So changing the keystore would make your API keys invalid. – Samuil Yanovski Aug 13 '15 at 19:21
  • Try to Clean your project and Run again – YTerle May 15 '16 at 18:09

0 Answers0