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