Repository navigation
Cannot run app libNativeScript.so: class not found com.tns.NativeScriptActivity #2352
Description
Activity
@victorhugom what versions of the nativescript-cli, and the android runtime package are you using (tns info)?
@Pip3r4o I`m using the latest versions of the cli and the runtime, but the same problem was occurring when using an older version (CLI 2.4.1 and runtime 2.4.1).
nativescript: 2.4.2
tns-core-modules: 2.4.1
tns-android: 2.4.1
@victorhugom
I was unable to reproduce the issue with those versions of the packages. I tried running the app both in release and debug configurations.
Please post a complete console output of your build/run. Thank you!
@Pip3r4o the output:
Executing before-prepare hook from C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\hooks\before-prepare\nativescript-dev-android-snapshot.js
Executing before-prepare hook from C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\hooks\before-prepare\nativescript-dev-typescript.js
Found peer TypeScript 2.1.4
app/app.ios.ts(89,5): error TS2304: Cannot find name 'GMSServices'.
app/app.ios.ts(97,16): error TS2304: Cannot find name 'FBSDKApplicationDelegate'.
app/app.ios.ts(101,16): error TS2304: Cannot find name 'FBSDKApplicationDelegate'.
app/app.ios.ts(105,9): error TS2304: Cannot find name 'FBSDKAppEvents'.
app/utils/camera-service.ios.ts(2,28): error TS2307: Cannot find module 'nativescript-imagepicker'.
app/utils/facebook-login.android.ts(7,9): error TS2339: Property 'facebook' does not exist on type 'typeof com'.
app/utils/facebook-login.android.ts(9,41): error TS2339: Property 'facebook' does not exist on type 'typeof com'.
app/utils/facebook-login.android.ts(11,9): error TS2339: Property 'facebook' does not exist on type 'typeof com'.
app/utils/facebook-login.android.ts(13,28): error TS2339: Property 'facebook' does not exist on type 'typeof com'.
app/utils/facebook-login.android.ts(14,33): error TS2339: Property 'facebook' does not exist on type 'typeof com'.
app/utils/facebook-login.android.ts(17,28): error TS2339: Property 'facebook' does not exist on type 'typeof com'.
app/utils/facebook-login.ios.ts(5,5): error TS2304: Cannot find name 'FBSDKLoginManager'.
app/utils/push-service.ts(1,29): error TS2307: Cannot find module 'nativescript-push-notifications'.
Project successfully prepared (android)
Executing after-prepare hook from C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\hooks\after-prepare\nativescript-dev-android-snapshot.js
:config phase: createDefaultIncludeFiles
+found plugins: nativescript-background-http
+found plugins: nativescript-camera
+found plugins: nativescript-facebook-plugin
+found plugins: nativescript-geolocation
+found plugins: nativescript-google-analytics
+found plugins: nativescript-google-maps-sdk
+found plugins: nativescript-push-notifications
+found plugins: nativescript-snackbar
+found plugins: nativescript-telerik-ui
+found plugins: tns-core-modules-widgets
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android/configurations folder...
:config phase: pluginExtend
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\nativescript-background-http\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\nativescript-camera\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\nativescript-facebook-plugin\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\nativescript-geolocation\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\nativescript-google-analytics\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\nativescript-google-maps-sdk\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\nativescript-push-notifications\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\nativescript-snackbar\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\nativescript-telerik-ui\include.gradle
+applying configuration from: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\configurations\tns-core-modules-widgets\include.gradle
:config phase: copyAarDependencies
:config phase: addAarDependencies
+adding dependency: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\libs\aar\android-upload-service.aar
+adding dependency: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\libs\aar\Common-2016.3.1118-dev-release.aar
+adding dependency: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\libs\aar\Data-2016.3.1118-dev-release.aar
+adding dependency: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\libs\aar\List-2016.3.1118-dev-release.aar
+adding dependency: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\libs\aar\Primitives-2016.3.1118-dev-release.aar
+adding dependency: C:\Users\rodri\Projetos\Metheora\eventz\src\Eventz.App\platforms\android\libs\aar\widgets-release.aar
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preF0F1F2F3F4F5F6F7F8F9DebugBuild UP-TO-DATE
:checkF0F1F2F3F4F5F6F7F8F9DebugManifest
:preF0F1F2F3F4F5F6F7F8F9ReleaseBuild UP-TO-DATE
:prepareAndroidUploadServiceLibrary UP-TO-DATE
:prepareAppRuntimeUnspecifiedLibrary UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2510Library UP-TO-DATE
:prepareComAndroidSupportAppcompatV72510Library UP-TO-DATE
:prepareComAndroidSupportDesign2510Library UP-TO-DATE
:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:prepareComAndroidSupportRecyclerviewV72510Library UP-TO-DATE
:prepareComAndroidSupportSupportCompat2510Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUi2510Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2510Library UP-TO-DATE
:prepareComAndroidSupportSupportFragment2510Library UP-TO-DATE
:prepareComAndroidSupportSupportMediaCompat2510Library UP-TO-DATE
:prepareComAndroidSupportSupportV42510Library UP-TO-DATE
:prepareComAndroidSupportSupportVectorDrawable2510Library UP-TO-DATE
:prepareComAndroidSupportTransition2510Library UP-TO-DATE
:prepareComFacebookAndroidFacebookAndroidSdk480Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesAnalytics1001Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1001Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase1001Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement1001Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesGcm1001Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesIid1001Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesMaps1001Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1001Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasks1001Library UP-TO-DATE
:prepareCommon201631118DevReleaseLibrary UP-TO-DATE
:prepareData201631118DevReleaseLibrary UP-TO-DATE
:prepareList201631118DevReleaseLibrary UP-TO-DATE
:preparePrimitives201631118DevReleaseLibrary UP-TO-DATE
:prepareWidgetsReleaseLibrary UP-TO-DATE
:prepareF0F1F2F3F4F5F6F7F8F9DebugDependencies
:compileF0F1F2F3F4F5F6F7F8F9DebugAidl UP-TO-DATE
:compileF0F1F2F3F4F5F6F7F8F9DebugRenderscript UP-TO-DATE
:generateF0F1F2F3F4F5F6F7F8F9DebugBuildConfig UP-TO-DATE
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:setProperties
:generateTypescriptDefinitions SKIPPED
:copyTypings SKIPPED
:asbg:generateInterfaceNamesList
:asbg:traverseJsFiles
:asbg:runAstParser UP-TO-DATE
:asbg:generateBindings UP-TO-DATE
:mergeF0F1F2F3F4F5F6F7F8F9DebugShaders UP-TO-DATE
:compileF0F1F2F3F4F5F6F7F8F9DebugShaders UP-TO-DATE
:generateF0F1F2F3F4F5F6F7F8F9DebugAssets UP-TO-DATE
:mergeF0F1F2F3F4F5F6F7F8F9DebugAssets UP-TO-DATE
:generateF0F1F2F3F4F5F6F7F8F9DebugResValues UP-TO-DATE
:generateF0F1F2F3F4F5F6F7F8F9DebugResources UP-TO-DATE
:mergeF0F1F2F3F4F5F6F7F8F9DebugResources UP-TO-DATE
:processF0F1F2F3F4F5F6F7F8F9DebugManifest UP-TO-DATE
:processF0F1F2F3F4F5F6F7F8F9DebugResources UP-TO-DATE
:generateF0F1F2F3F4F5F6F7F8F9DebugSources UP-TO-DATE
:incrementalF0F1F2F3F4F5F6F7F8F9DebugJavaCompilationSafeguard UP-TO-DATE
:compileF0F1F2F3F4F5F6F7F8F9DebugJavaWithJavac UP-TO-DATE
:compileF0F1F2F3F4F5F6F7F8F9DebugNdk UP-TO-DATE
:compileF0F1F2F3F4F5F6F7F8F9DebugSources UP-TO-DATE
:prePackageMarkerForF0F1F2F3F4F5F6F7F8F9Debug
:transformClassesWithDexForF0F1F2F3F4F5F6F7F8F9Debug
Result compacted from 7158,0KiB to 5441,7KiB to save 1716,3KiB
Merged dex #1 (69 defs/105,2KiB)
Merged dex #2 (205 defs/310,8KiB)
Merged dex #3 (46 defs/56,5KiB)
Merged dex #4 (5 defs/15,0KiB)
Merged dex #5 (359 defs/589,4KiB)
Merged dex #6 (206 defs/295,8KiB)
Merged dex #7 (10 defs/24,7KiB)
Merged dex #8 (157 defs/334,3KiB)
Merged dex #9 (691 defs/605,8KiB)
Merged dex #10 (138 defs/248,9KiB)
Merged dex #11 (70 defs/100,0KiB)
Merged dex #12 (73 defs/177,8KiB)
Merged dex #13 (221 defs/221,7KiB)
Merged dex #14 (1 defs/0,7KiB)
Merged dex #15 (15 defs/47,9KiB)
Merged dex #16 (83 defs/85,0KiB)
Merged dex #17 (491 defs/559,6KiB)
Merged dex #18 (2 defs/2,0KiB)
Merged dex #19 (133 defs/167,5KiB)
Merged dex #20 (314 defs/281,3KiB)
Merged dex #21 (318 defs/318,6KiB)
Merged dex #22 (28 defs/42,1KiB)
Merged dex #23 (8 defs/23,9KiB)
Merged dex #24 (311 defs/252,8KiB)
Merged dex #25 (225 defs/192,6KiB)
Merged dex #26 (29 defs/20,9KiB)
Merged dex #27 (152 defs/283,3KiB)
Merged dex #28 (34 defs/35,3KiB)
Merged dex #29 (23 defs/30,7KiB)
Merged dex #30 (92 defs/171,0KiB)
Merged dex #31 (57 defs/101,6KiB)
Merged dex #32 (21 defs/38,7KiB)
Merged dex #33 (93 defs/177,3KiB)
Merged dex #34 (15 defs/16,9KiB)
Merged dex #35 (47 defs/8,8KiB)
Result is 4742 defs/5441,7KiB. Took 1,1s
:myMergeDex
Result compacted from 6765,0KiB to 5449,7KiB to save 1315,2KiB
Merged dex #1 (1 defs/1,9KiB)
Merged dex #2 (1 defs/1,4KiB)
Merged dex #3 (1 defs/1,6KiB)
Merged dex #4 (1 defs/1,7KiB)
Merged dex #5 (1 defs/1,4KiB)
Merged dex #6 (1 defs/1,3KiB)
Merged dex #7 (1 defs/1,4KiB)
Merged dex #8 (1 defs/1,6KiB)
Merged dex #9 (1 defs/1,5KiB)
Merged dex #10 (1 defs/2,1KiB)
Merged dex #11 (1 defs/1,4KiB)
Merged dex #12 (1 defs/1,4KiB)
Merged dex #13 (1 defs/1,4KiB)
Merged dex #14 (1 defs/1,4KiB)
Merged dex #15 (1 defs/1,4KiB)
Merged dex #16 (1 defs/1,4KiB)
Merged dex #17 (1 defs/1,4KiB)
Merged dex #18 (1 defs/1,5KiB)
Merged dex #19 (1 defs/1,4KiB)
Merged dex #20 (1 defs/1,4KiB)
Merged dex #21 (1 defs/1,3KiB)
Merged dex #22 (1 defs/1,3KiB)
Merged dex #23 (4742 defs/5441,7KiB)
Result is 4764 defs/5449,7KiB. Took 0,5s
:buildMetadata UP-TO-DATE
:mergeF0F1F2F3F4F5F6F7F8F9DebugJniLibFolders UP-TO-DATE
:transformNative_libsWithMergeJniLibsForF0F1F2F3F4F5F6F7F8F9Debug UP-TO-DATE
:processF0F1F2F3F4F5F6F7F8F9DebugJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForF0F1F2F3F4F5F6F7F8F9Debug UP-TO-DATE
:validateDebugSigning
:packageF0F1F2F3F4F5F6F7F8F9Debug UP-TO-DATE
:zipalignF0F1F2F3F4F5F6F7F8F9Debug UP-TO-DATE
:assembleF0F1F2F3F4F5F6F7F8F9Debug UP-TO-DATE
:assembleDebug UP-TO-DATE
:buildapk UP-TO-DATE
BUILD SUCCESSFUL
Total time: 34.894 secs
Project successfully built
Successfully deployed on device with identifier '0017905909'.
same here with similar setup using following plugins
nativescript-geolocationnativescript-google-analyticsnativescript-google-maps-sdknativescript-push-notificationsnativescript-snackbarnativescript-telerik-ui- ...
$ tns info
All NativeScript components versions information
┌──────────────────┬─────────────────┬────────────────┬───────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 2.4.2 │ 2.4.2 │ Up to date │
│ tns-core-modules │ 2.4.4 │ 2.4.4 │ Up to date │
│ tns-android │ 2.4.1 │ 2.4.1 │ Up to date │
│ tns-ios │ │ 2.4.0 │ Not installed │
└──────────────────┴─────────────────┴────────────────┴───────────────┘
Android SDK Tools: 25.2.5
Android SDK Platform-tools: 25.0.3
Android SDK Build-tools: 25.0.2
removing nativescript-snackbar "fixes" the issue but not sure why...
@naderio @victorhugom the bug has been fixed, and is available in android@next, the upcoming 2.5 release which is coming this month also contains the fix.
is there an release plan for 2.5?
2.5 comes out next week, meanwhile if this is a showstopper for your project you could temporarily resort to using android@next.



I`m trying to build and run the app in two new machines and in both I have the same error:
The configs of both machines are the same: Windows 10, with the latest {N} and the Android SDK is instaled in the same way of the main machine, with the same SDK versions and all extras installed