SRD

compile

SRD
Jun 30th, 2016
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.76 KB | None | 0 0
  1. $ ./gradlew assemble
  2. Incremental java compilation is an incubating feature.
  3. :app:copyArmeabi-v7aDebugSharedLibraryStlSo UP-TO-DATE
  4. :libraries:testA:copyArmeabi-v7aDebugSharedLibraryStlSo UP-TO-DATE
  5. :libraries:testA:linktestAArmeabi-v7aDebugSharedLibrary UP-TO-DATE
  6. :libraries:testA:testAArmeabi-v7aDebugSharedLibrary UP-TO-DATE
  7. :libraries:testA:stripSymbolsArmeabi-v7aDebugSharedLibrary
  8. :libraries:testA:ndkBuildArmeabi-v7aDebugSharedLibrary
  9. :app:compilernArmeabi-v7aDebugSharedLibrarytestAMainC
  10. :app:linktestAArmeabi-v7aDebugSharedLibrary
  11. arm-linux-androideabi-g++: error: /home/pepp/workspace/ri/rn/libraries/testA/build/intermediates/binaries/debug/arm/obj/armeabi-v7a/libtestA.so: No such file or directory
  12.  
  13. :app:linktestAArmeabi-v7aDebugSharedLibrary FAILED
  14.  
  15. FAILURE: Build failed with an exception.
  16.  
  17. * What went wrong:
  18. Execution failed for task ':app:linktestAArmeabi-v7aDebugSharedLibrary'.
  19. > A build operation failed.
  20. Linker failed while linking libtestA.so.
  21. See the complete log at: file:///home/pepp/workspace/ri/rn/app/build/tmp/linktestAArmeabi-v7aDebugSharedLibrary/output.txt
  22.  
  23. * Try:
  24. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  25.  
  26. BUILD FAILED
  27.  
  28. Total time: 5.05 secs
  29.  
  30.  
  31. This is a sub-project under the libraries directory.
  32. $ tree
  33. .
  34. └── testA
  35. ├── build.gradle
  36. ├── proguard-rules.pro
  37. └── src
  38. └── main
  39. ├── AndroidManifest.xml
  40. ├── cpp
  41. │   ├── globals.cpp
  42. │   ├── globals.h
  43. │   ├── node.cpp
  44. │   └── vode.h
  45. ├── includes
  46. └── res
  47. └── values
  48. └── strings.xml
  49.  
  50. 7 directories, 12 files
  51.  
  52. Here's the testA/build.gradle file ...
  53.  
  54. apply plugin: 'com.android.model.library'
  55.  
  56. def ndkDir = System.getenv("ANDROID_NDK_HOME")
  57. def propertiesFile = project.rootProject.file('local.properties')
  58.  
  59. if (propertiesFile.exists()) {
  60. Properties properties = new Properties()
  61. properties.load(propertiesFile.newDataInputStream())
  62. ndkDir = properties.getProperty('ndk.dir')
  63. }
  64.  
  65. model {
  66. android {
  67. compileSdkVersion 24
  68. buildToolsVersion "24.0.0"
  69.  
  70. defaultConfig {
  71. minSdkVersion.apiLevel 21
  72. targetSdkVersion.apiLevel 24
  73. versionCode 1
  74. versionName "1.0"
  75.  
  76. buildConfigFields {
  77. create() {
  78. type "int"
  79. name "VALUE"
  80. value "1"
  81. }
  82. }
  83. }
  84.  
  85. ndk {
  86. platformVersion = 21
  87. moduleName = 'testA'
  88. stl = 'gnustl_shared'
  89. cppFlags.add('--std=c++11')
  90. ldLibs.addAll(['log', 'android', 'stdc++', 'dl'])
  91. CFlags.addAll(['-Wall'])
  92. }
  93.  
  94. buildTypes {
  95. release {
  96. minifyEnabled false
  97. proguardFiles.add(file("proguard-rules.pro"))
  98. }
  99. }
  100.  
  101. productFlavors {
  102. create("arm") {
  103. ndk {
  104. abiFilters.add("armeabi-v7a")
  105. }
  106. }
  107. }
  108.  
  109. sources {
  110. main {
  111. jni {
  112. source {
  113. srcDir "cpp"
  114. // srcDir "${ndkDir}/sources/android/native_app_glue"
  115. }
  116. exportedHeaders {
  117. srcDir "includes"
  118. // srcDir "${ndkDir}/sources/android/native_app_glue"
  119. }
  120. }
  121. }
  122. }
  123. }
  124. }
Advertisement
Add Comment
Please, Sign In to add comment