Application Not Starting - Insufficient Memory

GeorgeRussell :

The application is not even starting. Getting this before the main activity screen loads. I was making changes deeper into the application and have backed them out without resolution. It seems that it is trying to load the main activity and only displays the device/phone icons screen and never displays the main activity.

03/10 07:03:51: Launching 'app' on Nexus 4 API 23.
Installation did not succeed.
The application could not be installed.
Installation failed due to: ''pm install-create -r -t -S 10728728' returns error 'Unknown failure: Error: java.lang.IllegalStateException: ☃Requested internal only, but not enough space''
Retry

Logcat Entries

03-10 06:59:00.051 1274-1342/? D/hwcomposer: hw_composer sent 5 syncs in 60s
03-10 07:00:00.038 1274-1342/? D/hwcomposer: hw_composer sent 5 syncs in 60s
03-10 07:01:00.035 1274-1342/? D/hwcomposer: hw_composer sent 5 syncs in 60s
03-10 07:02:00.059 1274-1342/? D/hwcomposer: hw_composer sent 5 syncs in 60s
03-10 07:03:00.061 1274-1342/? D/hwcomposer: hw_composer sent 5 syncs in 60s
03-10 07:03:51.258 10240-10240/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
03-10 07:03:51.259 10240-10240/? D/AndroidRuntime: CheckJNI is ON
03-10 07:03:51.266 10242-10242/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
03-10 07:03:51.267 10242-10242/? D/AndroidRuntime: CheckJNI is ON
03-10 07:03:51.272 10240-10240/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
03-10 07:03:51.280 10242-10242/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
03-10 07:03:51.307 10242-10242/? E/memtrack: Couldn't load memtrack module (No such file or directory)
03-10 07:03:51.307 10242-10242/? E/android.os.Debug: failed to load memtrack module: -2
03-10 07:03:51.308 10240-10240/? E/memtrack: Couldn't load memtrack module (No such file or directory)
03-10 07:03:51.308 10240-10240/? E/android.os.Debug: failed to load memtrack module: -2
03-10 07:03:51.308 10242-10242/? I/Radio-JNI: register_android_hardware_Radio DONE
03-10 07:03:51.309 10240-10240/? I/Radio-JNI: register_android_hardware_Radio DONE
03-10 07:03:51.320 10242-10242/? D/AndroidRuntime: Calling main entry com.android.commands.pm.Pm
03-10 07:03:51.321 10240-10240/? D/AndroidRuntime: Calling main entry com.android.commands.wm.Wm
03-10 07:03:51.323 10240-10240/? D/AndroidRuntime: Shutting down VM
03-10 07:03:51.326 10242-10242/? E/Pm: Error
    java.lang.IllegalStateException: ☃Requested internal only, but not enough space
        at android.os.Parcel.readException(Parcel.java:1607)
        at android.os.Parcel.readException(Parcel.java:1552)
        at android.content.pm.IPackageInstaller$Stub$Proxy.createSession(IPackageInstaller.java:249)
        at com.android.commands.pm.Pm.runInstallCreate(Pm.java:1225)
        at com.android.commands.pm.Pm.run(Pm.java:154)
        at com.android.commands.pm.Pm.main(Pm.java:108)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:251)
03-10 07:03:51.327 10242-10242/? I/art: System.exit called, status: 1
03-10 07:03:51.327 10242-10242/? I/AndroidRuntime: VM exiting with result code 1.
03-10 07:04:00.057 1274-1342/? D/hwcomposer: hw_composer sent 5 syncs in 60s

Main Activity Java

package com.grgsolutions.checkingin;

import android.content.Intent;
import android.os.Bundle;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;

import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.view.View;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends AppCompatActivity {
    private AdView mAdView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        MobileAds.initialize(this, new OnInitializationCompleteListener() {
           @Override
           public void onInitializationComplete(InitializationStatus initializationStatus) {
          }
        });

        mAdView = findViewById(R.id.adView);
        AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build();
        mAdView.loadAd(adRequest);

        FloatingActionButton fab = findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
    public void switchToSettingsActivity(View view) {
        Intent intent = new Intent(this, Settings.class) ;
        startActivity(intent) ;
    }
    public void switchToCheckInActivity(View view) {
        Intent intent = new Intent(this, CheckIn.class);
        startActivity(intent);
    }
    public void switchToCommuteActivity(View view) {
        Intent intent = new Intent(this, Commute.class);
        startActivity(intent);
    }
    public void switchToRoadTripActivity(View view) {
        Intent intent = new Intent(this, RoadTrip.class);
        startActivity(intent);
    }
    public void switchToViewCheckInsActivity(View view) {
        Intent intent = new Intent(this, ViewCheckIns.class);
        startActivity(intent);
    }
    public void switchToRequestCheckInActivity(View view) {
        Intent intent = new Intent(this, RequestCheckIn.class);
        startActivity(intent);
    }
    public void switchToPeepsLocatorActivity(View view) {
        Intent intent = new Intent(this, PeepsLocator.class);
        startActivity(intent);
    }
    public void switchToMapsAndDirectionsActivity(View view) {
        Intent intent = new Intent(this, MapsAndDirections.class);
        startActivity(intent);
    }
    public void switchToContactsActivity(View view) {
        Intent intent = new Intent(this, Contacts.class);
        startActivity(intent);
    }
    public void switchToEmergencyActivity(View view) {
        Intent intent = new Intent(this, Emergency.class);
        startActivity(intent);
    }
    /** Called when leaving the activity */
    @Override
    public void onPause() {
        if (mAdView != null) {
            mAdView.pause();
        }
        super.onPause();
    }

    /** Called when returning to the activity */
    @Override
    public void onResume() {
        super.onResume();
        if (mAdView != null) {
            mAdView.resume();
        }
    }

    /** Called before the activity is destroyed */
    @Override
    public void onDestroy() {
        if (mAdView != null) {
            mAdView.destroy();
        }
        super.onDestroy();
    }
}
Uxman Khokher :

uninstalled the app and try again. This worked for me

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=172136&siteId=1