Coding for Android under Windows still possible?


#1

Hello everyone,

last July I first looked into this SDK to control the Bebop.
After installing Unix solely for the purpose of building the SDK and many hours of frustration(since I wasn’t familiar wth Unix,Git etc.) i finally got it to run.
Soon after that happened, Parrot released the compiled SDK (ARSDK3_Android_3_5.zip) and i could run it on Windows without any problems. Unfortunately that is not the case anymore. I can’t even run the projects i created with SDK version 3.5 with the current version of Android Studio.

The instructions at http://developer.parrot.com/docs/bebop/#android
suggest a solution, but while there is a link to the IOS binaries, the Android binaries are missing completely.

So my question is, will i have to reinstall unix again to compile and give up my hopes to keep working under Windows, or did you just forget to include the link to the Android binaries?

greetings,
derbestefan


#2

Hi,

Well I thought the documentation was pretty clear on that subject. Can you describe what is missing so we can improve the documentation?

Anyway, it is even easier than before, you just have to edit your build.gradle file and add this line:
compile 'com.parrot:arsdk:3.8'

Then, add to your code:
ARSDK.loadSDKLibs();

And you can start coding your Android app (on any OS) !

Best regards,
Djavan


#3

By the way, there is a standalone example of an Android app using the SDK libs from JCenter.
The code is on Parrot-Developers Github.

Here is the build.gradle file.
Here is the load libraries.

Cheers!


#4

Hi Djavan,

thank you for your really quick reply!

When adding ‘com.parrot:arsdk:3.8’ to my build.gradle i get the following error when i press Sync:

Error:Failed to resolve: com.parrot.arsdk:3.8:

Is there something i missed?

greetings,
derbestefan


#5

Are you adding it to your app’s build.gradle (and not your project’s build.gradle).
Are you connected to the Internet?


#6

Yes and yes, also tried it on two different machines one is win7 one is win10.


#7

Then try to clone the app code and run it.


#8

That worked, i can run it on the emulator. Unfortunately I only own android 4.4 devices. So i couldn’t run it on them.

But when i create a new project and edit the build.gradle it doesn’t work.


#9

If that’s ok with you, can you post a zip of your project through weTransfer?
You can remove code files if you prefer.


#10

Since the project is empty there are barely any code files to be removed.

Here you go:

http://we.tl/3igtUh0HYh


#11

Change
compile ‘com.parrot.arsdk:3.8’ to
compile ‘com.parrot:arsdk:3.8’

and you are good to go :slightly_smiling:


#12

Oh well, my bad, i feel stupid now :blush:
Sorry for the hassle!
Thank you very much!


#13

I am a late comer and newbie. I loaded this in Android Studio (win10) and got this error;

Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html

I didn’t do anything fancier than cloning and opening project. Is there something else that should be done


#14

Add a dimensions all clause to your build.gradle. sounds like you’re using Android studio 3


#15

Thank you very much for your quick and accurate response. That was it. I am using Android Studio 3.


#16

jesmitty

Hey Jesmitty
I am also fairly new and all of this is confusing.
‘I didn’t do anything fancier than cloning and opening project’

If you have time to answer, what project did you clone and open?


#17

I am tied up this week but I am happy to share a screen with you and show you this weekend. Google hangouts is convenient. When is good for you. What email should I use to invite you?