Start a new topic

Unfortunately, App has stopped.

Unfortunately, App has stopped.


Hello Martin,

You mention that you are using SDK 4.1.1 which is a really old version so I would suggest that you update to our current version, which is 5.3. Also, please note that we don't support older versions actively anymore.

Thanks,

Eva

Hello again, I'm adding wikitude sample for my project and using eclipse. Everytime I launch my project, the app suddenly stopped. This is my code:

In my MainActivity.java

protected void augmentedRealityView() {

      Intent intent = new Intent(MainActivity.this,

      ViewAugmentedReality.class);

      startActivity(intent);

}

 

I've added a button so that it will direct to the ViewAugmentedReality.java


 

import com.wikitude.architect.ArchitectView;

import com.wikitude.architect.StartupConfiguration;

import android.app.Activity;

import android.os.Bundle;

 

public class ViewAugmentedReality extends Activity {

 

    private ArchitectView architectView;

 

    @Override

    protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    setContentView(R.layout.augmented_reality);

 

    this.architectView = (ArchitectView) this.findViewById(R.id.architectView);

    final StartupConfiguration config = new StartupConfiguration("");

    this.architectView.onCreate(config);

    }

 

   @Override

   protected void onPostCreate(Bundle savedInstanceState) {

   // TODO Auto-generated method stub

   super.onPostCreate(savedInstanceState);

 

   architectView.onPostCreate();

   try {

   this.architectView.load("file:///android_asset/AugmentedReality/index.html");

   } catch (Exception e) {

 

   }

   }

 

   @Override

   protected void onResume() {

   // TODO Auto-generated method stub

   super.onResume();

 

   architectView.onResume();

   }

 

   @Override

   protected void onDestroy() {

   // TODO Auto-generated method stub

   super.onDestroy();

 

   architectView.onDestroy();

   }

 

   @Override

   protected void onPause() {

   // TODO Auto-generated method stub

   super.onPause();

 

   architectView.onPause();

   }

   }

 

and my augmented_reality.xml


<?xml version="1.0" encoding="UTF-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="match_parent"

    android:layout_height="match_parent" >

 

    <com.wikitude.architect.ArchitectView

        android:id="@+id/architectView"

    android:layout_width="fill_parent"

    android:layout_height="fill_parent"/>

</FrameLayout>

 

I'm using the sample Native Detail Screen. wikitudeSDK 4.1.1 and the sample works fine but when applied in my app it crashes. Any idea on how to fix this?

Login or Signup to post a comment