Open henorek opened 8 years ago
Hi,
here you have an Android example: https://github.com/meganz/sdk/tree/master/examples/android/ExampleApp_AS
If you cannot build the SDK, you can always use the prebuilt libraries that you will find on that link
Thanks!
Yes I used it, but even after pasting prebuild library into project as instruction says it doesn't work, still got
Error:Execution failed for task ':app:cleanMegaSDK'.
> A problem occurred starting process 'command 'make''
error
Ah, yes.. you are right.
If you are going to use the prebuilt library, then you will have to comment the compilation in the build.gradle: https://github.com/meganz/sdk/blob/master/examples/android/ExampleApp_AS/app/build.gradle
These lines are the ones related to the compilation of the library:
task megaSDK(type: Exec, description: 'Compile MEGA SDK via NDK') {
workingDir 'src/main/jni'
commandLine 'make'
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn megaSDK
}
task cleanMegaSDK(type: Exec, description: 'Clean MEGA SDK object files') {
workingDir 'src/main/jni'
commandLine 'make', 'veryclean'
}
clean.dependsOn 'cleanMegaSDK'
If you comment the compileTask -> compileTask.dependsOn megaSDK
it will be enough, but if you want to comment all that piece of code it will be OK too.
Ok then, we are getting closer. Now it doesn't see Mega dependencies, like MegaApiJava etc, of course I pasted libraries into project. I'm trying to build Android client btw.
The java files are on the SDK. Path: bindings/java/nz/mega/sdk
You have to include them on your project.
Got it. Still some problems, it looks like it cannot resolve some methods from MegaApi
E:\Projekty\AndroidStudioProjects\android\app\src\main\java\nz\mega\sdk\MegaApiJava.java
Error:(1022, 20) error: cannot find symbol method getMyUser()
Error:(3261, 16) error: cannot find symbol method enableTransferResumption()
Error:(3297, 16) error: cannot find symbol method enableTransferResumption(String)
Error:(3308, 16) error: cannot find symbol method disableTransferResumption()
Error:(3321, 16) error: cannot find symbol method disableTransferResumption(String)
Error:(4454, 39) error: no suitable method found for search(String)
method MegaApi.search(MegaNode,String,boolean) is not applicable
(actual and formal argument lists differ in length)
method MegaApi.search(MegaNode,String) is not applicable
(actual and formal argument lists differ in length)
Error:(4525, 23) error: cannot find symbol method authorizeNode(MegaNode)
E:\Projekty\AndroidStudioProjects\android\app\src\main\java\mega\privacy\android\app\lollipop\ManagerActivityLollipop.java
Error:(11500, 33) error: cannot find symbol variable CHANGE_TYPE_EMAIL
I am also getting the same issue by trying both methods described in README file.
Any solution ?
No support for building on Windows apparently. I'm always getting
bash: /d/Android/Sdk/ndk/20.0.5594570/ndk-which: No such file or directory
even though ndk-which.cmd is present.
Hi there, could you be so kind and add example for Makefile configuration under Windows platform? I have problem with setting NDK_ROOT. To be more specific, I got this error even after setting NDK_ROOT to my NDK location on disk
NDK_ROOT=D:/ProgramFiles/Android/sdk/ndk-build