howardpang / androidNativeBundle

a gradle plugin that support publish c/c++ headers to 'aar' and depend those 'aar'

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NativeLib Directory Doesn't exist on Rebuild

marandaneto opened this issue · comments

Hi, thanks for the lib :)

Full context: getsentry/sentry-android-gradle-plugin#98

AGP: 4.1.3
Gradle: 6.8.3
Plugin: 1.0.7

To reproduce:
https://github.com/getsentry/examples/tree/master/android

open AS and Build -> Rebuild project

Executing tasks: [clean, :app:assembleDebug] in project /Users/myuser/Github/examples/android

Configure project :app
:app:external cmake build
:app:external cmake build

Task :clean UP-TO-DATE
Task :app:preBuild
Task :app:preDebugBuild

Task :app:externalNativeBuildCleanDebug
Clean native-sample armeabi-v7a
ninja: Entering directory /Users/myuser/Github/examples/android/app/.cxx/cmake/debug/armeabi-v7a' [0/1] Re-running CMake... -- Configuring done -- Generating done -- Build files have been written to: /Users/myuser/Github/examples/android/app/.cxx/cmake/debug/armeabi-v7a [1/1] Cleaning all built files... Cleaning... 0 files. Clean native-sample arm64-v8a ninja: Entering directory /Users/myuser/Github/examples/android/app/.cxx/cmake/debug/arm64-v8a'
[0/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/myuser/Github/examples/android/app/.cxx/cmake/debug/arm64-v8a
[1/1] Cleaning all built files...
Cleaning... 0 files.
Clean native-sample x86
ninja: Entering directory /Users/myuser/Github/examples/android/app/.cxx/cmake/debug/x86' [0/1] Re-running CMake... -- Configuring done -- Generating done -- Build files have been written to: /Users/myuser/Github/examples/android/app/.cxx/cmake/debug/x86 [1/1] Cleaning all built files... Cleaning... 0 files. Clean native-sample x86_64 ninja: Entering directory /Users/myuser/Github/examples/android/app/.cxx/cmake/debug/x86_64'
[0/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/myuser/Github/examples/android/app/.cxx/cmake/debug/x86_64
[1/1] Cleaning all built files...
Cleaning... 0 files.

Task :app:extractProguardFiles
Task :app:preReleaseBuild

Task :app:externalNativeBuildCleanRelease
Clean native-sample armeabi-v7a
ninja: Entering directory /Users/myuser/Github/examples/android/app/.cxx/cmake/release/armeabi-v7a' [0/1] Re-running CMake... -- Configuring done -- Generating done -- Build files have been written to: /Users/myuser/Github/examples/android/app/.cxx/cmake/release/armeabi-v7a [1/1] Cleaning all built files... Cleaning... 0 files. Clean native-sample arm64-v8a ninja: Entering directory /Users/myuser/Github/examples/android/app/.cxx/cmake/release/arm64-v8a'
[0/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/myuser/Github/examples/android/app/.cxx/cmake/release/arm64-v8a
[1/1] Cleaning all built files...
Cleaning... 0 files.
Clean native-sample x86
ninja: Entering directory /Users/myuser/Github/examples/android/app/.cxx/cmake/release/x86' [0/1] Re-running CMake... -- Configuring done -- Generating done -- Build files have been written to: /Users/myuser/Github/examples/android/app/.cxx/cmake/release/x86 [1/1] Cleaning all built files... Cleaning... 0 files. Clean native-sample x86_64 ninja: Entering directory /Users/myuser/Github/examples/android/app/.cxx/cmake/release/x86_64'
[0/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/myuser/Github/examples/android/app/.cxx/cmake/release/x86_64
[1/1] Cleaning all built files...
Cleaning... 0 files.

Task :app:clean
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:generateDebugBuildConfig
Task :app:checkDebugAarMetadata
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:createDebugCompatibleScreenManifests
Task :app:extractDeepLinksDebug
Task :app:processDebugMainManifest
Task :app:processDebugManifest
Task :app:generateJsonModelDebug FAILED
Task :app:mergeDebugResources
Task :app:javaPreCompileDebug
Task :app:processDebugManifestForPackage

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:generateJsonModelDebug'.

/Users/myuser/Github/examples/android/app/CMakeLists.txt : C/C++ debug|armeabi-v7a : CMake Error at /Users/myuser/Github/examples/android/app/CMakeLists.txt:9 (include):
include could not find load file:

  /Users/myuser/Github/examples/android/app/build/nativeLib/gradle.mk
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s
17 actionable tasks: 16 executed, 1 up-to-date

try 1.0.9

Works for me! Thanks @howardpang