RosettaDrone / rosettadrone

MAVlink and H.264 Video for DJI drones
BSD 3-Clause "New" or "Revised" License
308 stars 117 forks source link

Problem building Rosetta Drone on Android Studio #172

Closed davidan208 closed 1 year ago

davidan208 commented 1 year ago

Hi guys, I'm following the setup instruction to build the rosetta drone for my DJI. I have initialized with git lfs install, generated key for Google Map API and DJI App and put it in the desired locations. But when I built on Android Studio 3.6.4 ( Gradle version 6.8.3), I encountered this image Can any one give me a guide to overcome this problem, thanks a lot.

kripper commented 1 year ago

Did you import the project using File->New->Import Project ?

davidan208 commented 1 year ago

Hi @kripper Yes I have. I''ve tried many times but it ends up the same.

Did you import the project using File->New->Import Project ?

kripper commented 1 year ago

Maybe something changed in the cloud. Please send a PR if you find the problem.

davidan208 commented 1 year ago

Maybe something changed in the cloud. Please send a PR if you find the problem.

Thank you @kripper. One question, when I install Android Studio, are there anything I should consider, or just doing as the recommend settings; and then just import this repository and build the apk without any additional steps (beside adding the keys.xml)

kripper commented 1 year ago

No. I believe the correct grade version is automatically downloaded and installed when you import and build the project.

davidan208 commented 1 year ago

No. I believe the correct grade version is automatically downloaded and installed when you import and build the project.

This is the most recent problem since I'm starting over again @kripper. image

Any change I should change other version of Android studio ? I'm very new so I don't do java pretty much. Thank you

jashshah999 commented 1 year ago

Hi. Yes you can change your Android SDK Version. Go to File > Project Structure and under this you should see Android SDK Version which must be set to 17.x for you now. Click on the drop down and change it to 15. Then build the APK and you should be good to go!

davidan208 commented 1 year ago

@jashshah999 you're a life saver. Thanks a lot my brother

kripper commented 1 year ago

Did something change and should we update the README build instructions?

estevezb commented 1 year ago

Hi, I am having the same issue but when i go to File > Project Structure i don't know where to find the Android SDK Version. image image

Would it be possible to provide a screen shot of those fields and menu?

jashshah999 commented 1 year ago

Yes now click on grade settings. SDK version is now in Gradle settings. You'll see the options there. Just click on the last link in your second screenshot.

On Fri, Aug 18, 2023, 11:03 PM estevezb @.***> wrote:

Hi, I am having the same issue but when i go to File > Project Structure i don't know where to find the Android SDK Version. [image: image] https://user-images.githubusercontent.com/56987765/261777279-51784888-b25b-45a7-af3b-c75934f4b13c.png [image: image] https://user-images.githubusercontent.com/56987765/261777467-b984b343-7e63-4b11-a9d9-a266823ae4f5.png

Would it be possible to provide a screen shot of those fields and menu?

— Reply to this email directly, view it on GitHub https://github.com/RosettaDrone/rosettadrone/issues/172#issuecomment-1684846816, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALX7MJQ54T43PNKBEAWBU3LXWBJM3ANCNFSM6AAAAAA3CQCZCY . You are receiving this because you were mentioned.Message ID: @.***>

estevezb commented 1 year ago

@jashshah999 . Please excuse my ignorance I am new to Android studio and Java. I clicked on the Gradle Settings link. Here is the new window. It is currently showing 17.02 which I expected based on your information. Do i download a new JDK version? You mentioned choosing 15 from this dropdown? If so, which one?, there are also multiple vendors listed but not sure that is relevant. Here is another screen shot to make sure i am on the same page: image

estevezb commented 1 year ago

@jashshah999. NM. This worked!!! Thank you!!!

estevezb commented 1 year ago

FYI, to the team, Readme could include , the specific vendor needed is azul 15 Azul Zulu : image

broccan commented 5 months ago

The position of gradle settings have now changed and can't access it via the SDK structure menu, instead you can find it using the following: image

image

CAMIprojectsUNI commented 3 months ago

I have encountered the same errors as previous users. I followed their steps and their help was useful up to a certain point... but I get this error when trying to Build->Make Project. general_problem

angel-ayala commented 2 months ago

Apparently seems to be a version problem with a dependency from Mapbox v9 which by the way is not supported anymore., I don't know exactly if is still being served since it continues appearing in maven's repo

UPDATE: There is actually no file at https://repo1.maven.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/

HEEJUN-SHIN commented 2 months ago

Hello, @angel-ayala @CAMIprojectsUNI, the problem comes from DJI UXSDK 4:16 and I found temporal solution from DJI Developer support.

https://sdk-forum.dji.net/hc/en-us/articles/37229365477657-During-the-compilation-of-the-MSDK-V5-example-where-it-stated-Could-not-find-com-mapbox-mapboxsdk-mapbox-android-accounts-0-7-0-How-should-address-this

you can add

 maven { url 'https://maven.aliyun.com/repository/public' }
 maven { url 'https://maven.aliyun.com/repository/google' }
 maven { url 'https://repo.huaweicloud.com/repository/maven'}

inside allprojects/repositories in project-level build.gradle.