4

How do I do that? I click on file -> import setting -> and choose this BasicSamples\libraries\BaseGameUtils\build.gradle

and I get an error

Error reading file 'C:\Users\xxx\Desktop\BasicSamples\libraries\BaseGameUtils\build.gradle'. There was error in opening zip file

Please make sure you have generated the file using 'File|Export Settings' feature.

Greyshack
  • 1,901
  • 7
  • 29
  • 48

1 Answers1

-1

To import the BaseGameUtils library project you need to:

  1. Open your project
  2. Open File > New > Import module
  3. Input your BaseGameUtils library file path
  4. Open your build.gradle file (ProjectName/app/build.gradle)
  5. Add compile project(':BaseGameUtils') to the first line of the dependencies list
  6. Sync project

This is the only working solution I could find for Android Studio. Happy coding!

Nathan Bird
  • 910
  • 1
  • 9
  • 23
  • Don't copy and paste the exact same [answer](http://stackoverflow.com/questions/17567453/android-studio-basegameutils/35528176#35528176) to multiple questions. Each answer should be unique to the question being asked and not a generic copy/paste. – Andy Feb 20 '16 at 20:48
  • I was merely answering his question. :| It's not like the answer should be completely different for a similar question. – Nathan Bird Feb 22 '16 at 21:06
  • Responding to your comments on [your now deleted question](https://stackoverflow.com/questions/39778805/android-real-time-google-maps-location-tracking), no I haven't deleted your comment - I do not have the powers to, only moderators can do that. I did flag a couple of them as too chatty, which is standard practice here - comments are designed to be ephemeral. I've flagged your outburst, and that is likely to be deleted as well. – halfer Oct 08 '16 at 16:44
  • If your frustration is based on my editing your post, then please note that everyone's posts are editable by others here - the point is that questions and answers are maintained by the community. If you want a more traditional format where your posts are sacrosanct, there's Reddit - there are some great programmer communities there too. – halfer Oct 08 '16 at 16:45
  • (With regret, I have downvoted your post, as you need to learn that attempting to hurt other people's feelings deliberately has a negative consequence). – halfer Oct 08 '16 at 16:56
  • I am sorry, my intentions were not to hurt your feeling and I apologize if I did. I was letting my frustration about not being able to find a solution to my problem control my mouth, or in this case, fingers. ;) – Nathan Bird Nov 02 '16 at 19:03