1

Im trying to get "nxp NTAG I2C Demo Android App". I've followed their guide, but I get following error Message trying to run the build:

Error while executing: am start -n "com.nxp.ntagi2cdemo/com.nxp.nfc_demo.activities.SplashActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.nxp.ntagi2cdemo/com.nxp.nfc_demo.activities.SplashActivity }

Error type 3

Error: Activity class {com.nxp.ntagi2cdemo/com.nxp.nfc_demo.activities.SplashActivity} does not exist.

Error while Launching activity

I've tried to clean, erase gradle, sync gradle again, rebuild this project, invalidate cache/restart but nothing really works. I also tried to debug the app on my plugged in phone, but it only opens the app, if it's installed (the app is already on playstore, but I need to change it), else the mistake from above. I also checked the AndroidManifest.xml, which already has:

<activity android:name="com.nxp.nfc_demo.activities.SplashActivity" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan" >

The splash activity code:

package com.nxp.nfc_demo.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;

import com.nxp.ntagi2cdemo.R;

public class SplashActivity extends Activity {
    public static final String TAG = "ActivitySplash";
    private CountDownTimer contador;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        contador = new CountDownTimer(2000, 1000) {
            @Override
            public void onFinish() {
                Intent intent = new Intent(getBaseContext(), MainActivity.class);
                startActivity(intent);
                finish();
            }

            @Override
            public void onTick(long millisUntilFinished) {
            }
        }.start();
    }

    @Override
    public void onBackPressed() {
        contador.cancel();
        super.onBackPressed();
    }

    @Override
    protected void onStop() {
        contador.cancel();
        super.onStop();
    }
}

The code I used can be found here. The guide I followed is this one.

Thanks in advance! Sincerly

Crackl1ng

  • please post SplashActivity code – Flying Dutchman Apr 30 '20 at 08:45
  • https://stackoverflow.com/a/59172106/8851753, try this – haliltprkk Apr 30 '20 at 09:07
  • Does this answer your question? [Activity class does not exist (Error type 3)](https://stackoverflow.com/questions/46888298/activity-class-does-not-exist-error-type-3) – haliltprkk Apr 30 '20 at 09:08
  • I've also tried them, had the same issues/ when I changed deploy in "run configuration" to "Default APK" from "Nothing", I get a new Error: Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant: debug. I also added the SplashActivity code in the main question – Norman Wiedemeyer Apr 30 '20 at 12:38

0 Answers0