We ran into the same issue when we tried to submit an app to Amazon Underground. Unfortunately the instructions from Amazon mean that the package name must be hard coded into the classes.dex file, so it will be different for every user, and every app, so the IDE export process can't be modified to support it in the general case. It can be modified to support a particular app by replacing the export process classes.dex with one for a particular app, as they suggest.
To create such as classes.dex you will need to compile it with Eclipse and the Android SDK. You don't need to go through the entire Tier 2 process, you can ignore anything to do with cygwin or NDK. Unfortunately Google have moved away from Eclipse and on to Android Studio so it may be difficult to get setup with Eclipse and the Android SDK now, but if you want to give it a go here is what you need to do.
* Install the Java Development Kit, Eclipse, and the ADT plugin.
* In the Android SDK Manager install the "SDK Platform" from "Android 3.2 (API 13)", also install the "Android SDK Tools" and "Android SDK Platform-tools" from the "Tools" section.
* Import the "interpreter_ouya_lite" project into Eclipse from the AGK\Tier 2\apps folder. This is the simplest project for Android so if you don't need IAP, Ads, Facebook, or push notifications then it makes things much easier to use this one.
* At this point you should try building the Ouya Player Lite project and running it on a device to check everything is working.
* Notice in the interpreter_ouya_lite/src folder the folder structure follows the package name, in this case "src/com/thegamecreators/agk_player", make some new folders that follow your own package structure, for example "src/com/mycompany/mygame"
* In this new folder create a new file called CustomNativeActivity.java with the following contents
package com.mycompany.mygame;
import android.app.NativeActivity;
public class CustomNativeActivity extends NativeActivity
{
}
* Replace com.mycompany.mygame with your package name. Any time I mention com.mycompany.mygame from now on, replace it with your package name.
* In src\com\thegamecreators\agk_player\MyJavaActivity.java replace
//import com.thegamecreators.iaptest.R;
with
import com.mycompany.mygame.R;
* In the AndroidManifest.xml file replace the line
<activity android:name="android.app.NativeActivity"
with
<activity android:name="com.mycompany.myname.CustomNativeActivity"
* Test building and running the modified project in Eclipse, hopefully it should still work.
* Right click on the project in Eclipse and choose Export , select Export Android Application and click Next
* The project should already be selected so click Next again
* Enter your keystore details, or generate a new one, it doesn't matter which one you use
* Once you have exported the APK rename it to .zip and extract it somewhere.
* Copy the classes.dex into the AppGameKit IDE folder, on Windows this will be "AGK\Tier 1\Editor\data\android\sourceOuya"
* Also in this folder is another AndroidManifest.xml file, open it and make the same change we made earlier replacing
<activity android:name="android.app.NativeActivity"
with
<activity android:name="com.mycompany.myname.CustomNativeActivity"
* Do not add or remove anything else from this file, it is purposefully missing its top half
* The AppGameKit IDE should now be able to export APKs using the the Ouya drop down menu that will be compatible with Amazon Underground, but only for the specific package name that you used.