Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: method downloadLogFile(Entry,String) is already defined in class LogFiles #117

Open
SSSnow opened this issue Sep 27, 2022 · 2 comments

Comments

@SSSnow
Copy link

SSSnow commented Sep 27, 2022

When I run ./gradlew build in Ubuntu 18.04 , the error report:

MAVSDK-Java/sdk/mavsdk/build/generated/source/proto/main/mavsdk/io/mavsdk/log_files/LogFiles.java:368: error: method downloadLogFile(Entry,String) is already defined in class LogFiles
    public Single<LogFiles.ProgressData> downloadLogFile(@NonNull Entry entry, @NonNull String path) {
                                         ^
1 error
@JonasVautherin
Copy link
Collaborator

Yes there is an issue in the proto files that does not work with Java. I need to fix that at some point. In the meantime, just edit the proto files like this:

diff --git a/protos/log_files/log_files.proto b/protos/log_files/log_files.proto
index 8307c89..b4c9bc3 100644
--- a/protos/log_files/log_files.proto
+++ b/protos/log_files/log_files.proto
@@ -17,10 +17,6 @@ service LogFilesService {
         option (mavsdk.options.async_type) = ASYNC;
         option (mavsdk.options.is_finite) = true;
     }
-    // Download log file synchronously.
-    rpc DownloadLogFile(DownloadLogFileRequest) returns(DownloadLogFileResponse) {
-        option (mavsdk.options.async_type) = SYNC;
-    }
     // Erase all log files.
     rpc EraseAllLogFiles(EraseAllLogFilesRequest) returns(EraseAllLogFilesResponse) {
         option (mavsdk.options.async_type) = SYNC;
@@ -42,11 +38,6 @@ message DownloadLogFileResponse {
     ProgressData progress = 2; // Progress if result is progress
 }
 
-message DownloadLogFileRequest {
-    Entry entry = 1; // Entry of the log file to download.
-    string path = 2; // Path of where to download log file to.
-}
-
 message EraseAllLogFilesRequest {}
 message EraseAllLogFilesResponse {
     LogFilesResult log_files_result = 1;

@JonasVautherin JonasVautherin changed the title build sdk error!!! error: method downloadLogFile(Entry,String) is already defined in class LogFiles Sep 27, 2022
@SSSnow
Copy link
Author

SSSnow commented Sep 28, 2022

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants