Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
07/14/16 02:32 AM (7 years ago)

Installing Android Studio

Hi everyone, I hope you are all doing well. I've set up Android Studio on both my PC and my Mac. I followed Mark Fleming's excellent video https://www.youtube.com/watch?v=T64bCkeZGxY- many thanks, Mark. I get an error when I import a BT v2.0 app. I get the same error on both my PC and Mac. The error is: Failed to set up sdk Error Module 'app': platform'Google Inc.:Google APIs 11 not found android studio The APIs are definitely installed and I've tried he solutions offered online as well as completely reinstalling Android Studio. I've spent over a day researching a solution for this so I'd really appreciate some ideas. Many thanks, John.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/14/16 06:32 AM (7 years ago)
BTv2? You're sure it's v2 and not v3? If so, then it may not work. BTv2 for Android was based on 'activities'. BTv3 is based on 'fragments'. I could be wrong... But I suspect a BTv2 project should stay in Eclipse. Cheers! -- Smug
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
07/14/16 06:47 AM (7 years ago)
Thanks, Smug. I'm just reinstalling Eclipse. Great fun - thought I'd done with it! Any other thoughts about this issue would be gratefully received as I really need to get Android Studio going.
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
07/14/16 11:21 AM (7 years ago)
Update - I have also just tried opening a BTv1.4 app in Android Studio and I get almost exactly the same error: "Failed to set up sdk Error Module 'app': platform'Google Inc.:Google APIs 4 not found android studio" Can you open either v1.4 or v2.0 apps with Android Studio? If so, what am I doing incorrectly?
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
07/14/16 12:26 PM (7 years ago)
I have just created an empty app, with one Menu Simple menu which leads to an empty plugin for Android. With two or three errors along the way, it works. So it is possible to use the latest version of Android Studio 2.1.2 to produce old BT apps. Which means something else is wrong. Can you produce an empty BT app with version 3.0? What does your gradle module file looks like, please show it here.
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
07/15/16 03:50 AM (7 years ago)
Thanks very much for taking the time to see what happens, Dusko. It's most appreciated. I have looked at Android Studio and there is no gradle module. See the picture at http://epeqe.com/Gradle.jpg to see what is there. I think that this may be the root of the problem. I haven't done a BT3.0 for now as it does not seem worthwhile. Please let me know what you think and what I could be doing wrong.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
07/15/16 04:37 AM (7 years ago)
You must have a gradle module file. Mine typically looks like this: ================= apply plugin: 'com.android.application' android { compileSdkVersion 14 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.xxxxxxxx" minSdkVersion 14 targetSdkVersion 14 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile files('libs/gcm.jar') compile 'com.google.android.gms:play-services-ads:9.2.1' } ================= Probably the safest route for you now is to go to buzztouch.com, enter your account there, create a simple BT 3.0 app with one Menu Simple and one Custom URL screen, and download it to your Android Studio. That will work properly and will contain everything you need to develop in AS. When that start working, you can download older apps and they will work (or, to be more precise, if they don't, it won't have much to do with AS as such). Search the forums for Mark's introductory video on Android Studio. It has helped me and has helped everybody else so it should also help you too to get going with Android, Android Studio and Buztouch framework.
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
07/15/16 08:12 AM (7 years ago)
Thanks, Dusko. Your help has been great. I've done as you say and created a BT3.0 app and the good news is that I no longer have that original error - hurray! The bad news is I have 116 other errors! I've been trying to figure out what is causing this but I haven't got there yet. Anyway, the original problem is resolved which is a big step forward. I'll try to crack this next problem myself but I'll post a question if I need to. I'm not quite sure how to create the gradle module file for my BT2.0 apps but I'll try to figure that out, too. Thanks for your time, Dusko. :)
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
07/15/16 08:25 AM (7 years ago)
You are welcome. To get your BT 2.0 app going, experiment with compileSdkVersion minSdkVersion targetSdkVersion values in the gradle file. One or more of these values would have to be 8 since BT 2.0 is working with generation 8 instead of 14, as is the case for BT 3.0. If you have 115 or more errors in Android Studio, most probably you don't have something downloaded that the app addresses somewhere in the /values folder. Once these errors are gone, everything will start working like a clockwork.
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
07/15/16 08:39 AM (7 years ago)
Thanks again, Dusko. I'm trying to figure out what is missing. It might be something to do with Google Play Services, I'm not sure. Think I may be sending a few more hours (days?) in front of my screen! :) -- John
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
07/15/16 09:33 AM (7 years ago)
This line in gradle module will take care of Google Play Services: compile 'com.google.android.gms:play-services-ads:9.2.1' Just be sure that it is there, add it as a text, if you will.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.