SDKLauncher-Android icon indicating copy to clipboard operation
SDKLauncher-Android copied to clipboard

Readium NDK debug

Open MaximeMenotti opened this issue 8 years ago • 15 comments

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 ?

MaximeMenotti avatar May 13 '16 09:05 MaximeMenotti

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

rkwright avatar May 13 '16 12:05 rkwright

I'm on windows 10 Android Studio 2.1 NDK r11c

MaximeMenotti avatar May 13 '16 12:05 MaximeMenotti

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 avatar May 16 '16 05:05 danielweck

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).

danielweck avatar May 16 '16 05:05 danielweck

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 avatar May 17 '16 09:05 MaximeMenotti

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)

MaximeMenotti avatar May 17 '16 12:05 MaximeMenotti

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

clebeaupin avatar May 17 '16 13:05 clebeaupin

@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 )

danielweck avatar May 17 '16 17:05 danielweck

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.

romaingiard avatar May 19 '16 07:05 romaingiard

@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?

danielweck avatar May 19 '16 08:05 danielweck

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.

rkwright avatar May 19 '16 12:05 rkwright

@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 avatar May 20 '16 11:05 clebeaupin

@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 avatar May 20 '16 12:05 clebeaupin

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"

clebeaupin avatar May 20 '16 13:05 clebeaupin

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

romaingiard avatar May 20 '16 13:05 romaingiard