I am trying to run the MainActivity sample within Android Studio and getting exceptions on all the Java files. All of them are related to Class R. Ex: One exception is R.layout.list_main is not a field. Another one is R.layout.activity_zbutton is not a field. Almost all the files did not have amazon.R package import statement. After Android Studio fixed it by adding the import statement all exceptions point to those kind of errors (not a field or can not find reference). Are the samples and released SDK in sync?
Hi Smallik, The ‘MainActivity’ is actually a class within one of the 9 sample apps included within the FirePhone SDK download. To use the samples, you will first need to delete the samples you have imported thus far. Then open Android Studio, select ‘File’ > ‘Import Project’ and navigate to your downloaded/extracted Fire_Phone folder. Then select the ENTIRE Samples folder, then ‘OK’ to start the import. The Samples folder has several files that the Gradle build system needs for any of the sample apps to compile and run properly. For more information, please follow the instructions at:
This is related to the SDK samples as well. The documentation states: Viewing Samples Using Android Studio Open Android Studio. On the File menu, click Import Project. Select the /add-ons/addon-amazon_fire_phone_sdk_addon-amazon-17/samples directory. Click Ok to load all samples within the directory. Select a sample to run. Click Run. Done. But after importing it there's nothing I can Run, it imports some gradle settings and all I see is this:
http://i.imgur.com/6fq4dhz.pnghttp://i.imgur.com/4CndZpu.pnghttp://i.imgur.com/DgB9EGV.png I'm using Android Studio 1.0.1. Thank you.