Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio project succesfully launching but nothing pops up - Android Java

I'm running:

package com.example.projectTest;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

public class WelcomePage extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome_page);
    }
}

with:

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".WelcomePage">

</androidx.constraintlayout.widget.ConstraintLayout>

but I'm getting the following error in the logcat when I run:

Could not get package user id: run-as: unknown package: com.example.projectTest
Could not find apks for this package: com.example.projectTest
Could not get package user id: run-as: unknown package: com.example.projectTest
Could not find apks for this package: com.example.projectTest
Failed to measure fs-verity, errno 1: /data/app/~~kWSycfQmCvKbfYx2KzxrNA==/com.example.projectTest-x4Zc9BUq0kRGdN5aX5AxXQ==/base.apk

The launch succeeds, but no app shows up on the emulator (Pixel 6 API 32). What could be the problem? Thank you.

like image 404
prodohsamuel Avatar asked Dec 30 '25 04:12

prodohsamuel


1 Answers

I went to Run > Edit Configurations and set launch to a Specified Activity. I then set the specified activity and in AndroidMainfest.xml, inside the activity tag, I set exported=true. Now it works.

like image 153
prodohsamuel Avatar answered Dec 31 '25 18:12

prodohsamuel