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

Readium NDK debug #93

Open
MaximeMenotti opened this issue May 13, 2016 · 15 comments
Open

Readium NDK debug #93

MaximeMenotti opened this issue May 13, 2016 · 15 comments

Comments

@MaximeMenotti
Copy link

Hi, when I try to use the the experimental gradle to recompile the sdk automatically an error occurs

Error:FAILURE: Build failed with an exception.

* What went wrong:
Task 'generateDebugSources' not found in project ':app'. Some candidates are: 'generateArmDebugSources', 'generateX86DebugSources'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Here is my local.properties file content :

ndk.dir=C\:\\Users\\Maxime\\Cloud\\Hubic\\Documents\\android-ndk-r11c-windows-x86_64\\android-ndk-r11c
sdk.dir=C\:\\Users\\Maxime\\AppData\\Local\\Android\\sdk
readium.ndk_debug=true

I used the develop branch of SDKLauncherAndroid to compil in Android Studio. I tried to change the readium-sdk and the readium-sharedjs branches to develop but the error is the same.

There is an error in my approach or is it a real problem ?

@rkwright
Copy link
Member

@MaximeMenotti Can you provide a little more info? OS and version and the version of Android Studio?

@MaximeMenotti
Copy link
Author

I'm on windows 10
Android Studio 2.1
NDK r11c

@rkwright rkwright changed the title Redium NDK debug Readium NDK debug May 13, 2016
@danielweck
Copy link
Member

Hello, I am not able to reproduce this bug. I am on Windows 10, I use Android Studio 2.1.1 (latest from Canary update channel), with NDK r11c, and I test with hybrid Java/C++ debugging enabled (readium.ndk_debug=true in local.properties).

@danielweck
Copy link
Member

PS: I forgot to mention that I am able to successfully run/debug the Android app built from the develop and the feature/lcp branches, targeting my ARM device (not the X86 emulator).

@MaximeMenotti
Copy link
Author

I update Android Studio to be in 2.1.1, iI tried to change to feature/lcp branch to test...
I have an other problem if I activate the readium.ndk_debug=true option :

Error:A problem occurred configuring project ':app'.
Exception thrown while executing model rule: ComponentModelBasePlugin.Rules#createSourceTransformTasks
Project ':lcp' does not export native artifacts

If i try without the readium.ndk_debug=true an other error appears :

Error:Could not determine the dependencies of task ':app:compileDebugAidl'.
Task with path ':lcp:buildMk' not found in project ':app'.

I'm still using the NDK r11c and try to run on a Samsung Galaxy S4 5.0.1.

@MaximeMenotti
Copy link
Author

MaximeMenotti commented May 17, 2016

PS : I don't know why but the readium-lcp-client folder is almost empty (only child forlder and a .iml file).

And for me the sub git module https://github.com/readium/readium-lcp-client/tree/72d363c10b08547674b65ba9dc66f9708656dada give a 404 error.

Maybe I don't have access to this branch of the project... (for information I'm from NordSoft, the same organization as @romaingiard)

@clebeaupin
Copy link
Contributor

Maybe you must run git submodule update --init --recursive to get readium-lcp-client

@danielweck
Copy link
Member

danielweck commented May 17, 2016

@clebeaupin @MaximeMenotti https://github.com/readium/readium-lcp-client is a private repository at the moment, thus the HTTP 404 error code :(

Please continue to use the develop branch of every repository / submodule. Make sure to double-check that ; as Cyrille said ; each repo is init'ed (see command line tips here https://github.com/readium/readium-js-viewer/blob/develop/README.md#git-initialisation )

@romaingiard
Copy link

romaingiard commented May 19, 2016

Hello,
I got the same error as Maxime Menotti (using the develop branch) when I use readium.ndk_debug=true :

Error:FAILURE: Build failed with an exception.

  • What went wrong:
    Task 'generateDebugSources' not found in project ':app'. Some candidates are: 'generateArmDebugSources', 'generateX86DebugSources'.
  • Try:
    Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

@danielweck
Copy link
Member

@romaingiard did you check that your readium-sdk submodule is init'ed and checked-out to the develop branch, as per my comment above yours?

@rkwright
Copy link
Member

Note that there is also a bash script here:

https://github.com/readium/readium-test-files/blob/master/util/scripts/readium_clone.sh

That does all of the proper steps in one fell swoop.

@clebeaupin
Copy link
Contributor

@MaximeMenotti @romaingiard
Have you checked your build variants ? You have to select X86 or ARM

Could you give all your android studio dependency versions ?

  • android studio
  • lldb
  • ndk
  • sdk

@clebeaupin
Copy link
Contributor

@MaximeMenotti @romaingiard
Stupid question: Which project have you opened in Android studio ?
The cloned repository or the SDKLauncher-Android folder in the cloned repository ?

@clebeaupin
Copy link
Contributor

I was able to reproduce your bug.
The cause is that your gradle files are not synchronized. To synchronize them click in the top toolbar on the icon on the left called "Sync project with gradle files"

@romaingiard
Copy link

With lldb 2.1 it works (for @MaximeMenotti it works too)

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

No branches or pull requests

5 participants