I am using theWikitude Epson SDK 4.0.3 with Android Studio and trying to follow the setup Guide. When I paste the following code into my MainActivity.java I get a build error saying the symbol StartupConfiguration cant be found. The application builds fine before I paste the lincense code in. I declared a varible above "private ArchitectView architectView;". Any suggestons would be greatly appreciated! Thank you.
This is the license code causing the build problems:
/* pass SDK key if you have one, this one is only valid for this package identifier and must not be used somewhere else */
final ArchitectConfig config = new ArchitectConfig( this.getWikitudeSDKLicenseKey() );
try {
/* first mandatory life-cycle notification */
this.architectView.onCreate( config );
}
Also we are currently working on releasing our new epson sdk soon so keep in touch for new updates!
M
Mariah Billings
said
almost 7 years ago
Eva, Thank you for getting back to me. I implemented the sugessted code and looked at the AbstractArchitectCamActivity.java. I am trying to pass the license key into getWikitudeSDKLicenseKey() as a string, but the the method is cannot be found. I am also getting an error for .getArchitectViewId() . Below is my code for MainActivity.java. I apprciate your assistance with this matter.
public class MainActivity extends AppCompatActivity { private ArchitectView architectView; /* I am inserting trial license key below */ public String LicenseKey = " ";
public class MainActivity extends AppCompatActivity { private ArchitectView architectView; /* I am inserting trial license key below */ public String LicenseKey = " ";
this.architectView = (ArchitectView)this.findViewById( R.id.architectView ); // Just set it directly to the id of the ArchitectView as defined in the activity_main layout
/* pass SDK key if you have one, this one is only valid for this package identifier and must not be used somewhere else */
final ArchitectView.ArchitectConfig config = new ArchitectView.ArchitectConfig( *INSERT LICENCE KEY HERE* ); // You can just insert the licence key directly.
Thank you! I appreciate your quick reply. That fixed the license key errors. I have one remaining error when I try to run the app. I pasted the error below and a copy of my build.gradle file. Thanks
ERROR:
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK sdk_logo-1.png File1: C:Users\myusername\AndroidStudioProjects\Test2\app\libs\wikitudesdk.jar File2: C:\Users\myusername\AndroidStudioProjects\Test2\app\libs\wikitudesdk.jar
Mariah Billings