Title: Static binding generator crash build-time: clazz is null causes app to crash · Issue #665 · NativeScript/android · GitHub
Open Graph Title: Static binding generator crash build-time: clazz is null causes app to crash · Issue #665 · NativeScript/android
X Title: Static binding generator crash build-time: clazz is null causes app to crash · Issue #665 · NativeScript/android
Description: Please, provide the details below: Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo? Yes. Tell us about the problem Recently cleaned out my project directory and now I'm having thes...
Open Graph Description: Please, provide the details below: Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo? Yes. Tell us about the problem Recently cleaned out my p...
X Description: Please, provide the details below: Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo? Yes. Tell us about the problem Recently cleaned out my p...
Opengraph URL: https://github.com/NativeScript/android/issues/665
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Static binding generator crash build-time: clazz is null causes app to crash","articleBody":"## Please, provide the details below:\r\n\r\n### Did you verify this is a real problem by searching [Stack Overflow](http://stackoverflow.com/questions/tagged/nativescript) and the [other open issues in this repo](https://github.com/NativeScript/nativescript/issues)?\r\nYes.\r\n\r\n### Tell us about the problem\r\nRecently cleaned out my project directory and now I'm having these build issues:\r\n```\r\n:asbg:generateInterfaceNamesList\r\n:asbg:traverseJsFiles\r\n:asbg:runAstParser\r\nRunning full build\r\nfinished with reading lines with js files\r\n:asbg:generateBindings\r\njava.lang.IllegalArgumentException: clazz is null\r\n\tat org.nativescript.staticbindinggenerator.ClassInfo.\u003cinit>(ClassInfo.java:25)\r\n\tat org.nativescript.staticbindinggenerator.ClassInfo.\u003cinit>(ClassInfo.java:20)\r\n\tat org.nativescript.staticbindinggenerator.ClassInfo.getSuperclass(ClassInfo.java:132)\r\n\tat com.tns.bindings.Dump.isApplicationClass(Dump.java:626)\r\n\tat com.tns.bindings.Dump.getSupportedMethods(Dump.java:323)\r\n\tat com.tns.bindings.Dump.generateProxy(Dump.java:211)\r\n\tat com.tns.bindings.ProxyGenerator.generateProxy(ProxyGenerator.java:36)\r\n\tat org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:87)\r\n\tat org.nativescript.staticbindinggenerator.Main.main(Main.java:15)\r\n:mergeF0F1F2F3DebugShaders\r\n:compileF0F1F2F3DebugShaders\r\n:generateF0F1F2F3DebugAssets\r\n:mergeF0F1F2F3DebugAssets\r\n```\r\nwhich results in the app crashing on launch.\r\n\r\n### Please provide the following version numbers that your issue occurs with:\r\n```\r\n┌──────────────────┬─────────────────┬────────────────┬─────────────┐\r\n│ Component │ Current version │ Latest version │ Information │\r\n│ nativescript │ 2.4.2 │ 2.4.2 │ Up to date │\r\n│ tns-core-modules │ 2.4.3 │ 2.4.3 │ Up to date │\r\n│ tns-android │ 2.4.1 │ 2.4.1 │ Up to date │\r\n│ tns-ios │ 2.4.0 │ 2.4.0 │ Up to date │\r\n└──────────────────┴─────────────────┴────────────────┴─────────────┘\r\n```\r\n\r\n### Did the error happen while the app was being constructed? (buildtime error)\r\nYes. I tried doing `--log trace` but it flooded my terminal memory and couldn't capture it 😦 \r\nThe app builds and deploys to device no problem.\r\n\r\n### Did the error happen while the app was executing? (runtime error)\r\nYes,\r\n```\r\n12-22 14:42:25.493 17606 17606 W System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: \r\n12-22 14:42:25.493 17606 17606 W System.err: Error calling module function \r\n12-22 14:42:25.493 17606 17606 W System.err: Error calling module function \r\n12-22 14:42:25.493 17606 17606 W System.err: Error: java.lang.ClassNotFoundException: com.tns.NativeScriptActivity\r\n12-22 14:42:25.493 17606 17606 W System.err: java.lang.Class.classForName(Native Method)\r\n12-22 14:42:25.493 17606 17606 W System.err: java.lang.Class.forName(Class.java:324)\r\n12-22 14:42:25.493 17606 17606 W System.err: java.lang.Class.forName(Class.java:285)\r\n12-22 14:42:25.493 17606 17606 W System.err: com.tns.Runtime.getClassForName(Runtime.java:947)\r\n12-22 14:42:25.493 17606 17606 W System.err: com.tns.ClassResolver.resolveClass(ClassResolver.java:50)\r\n12-22 14:42:25.493 17606 17606 W System.err: com.tns.Runtime.resolveClass(Runtime.java:565)\r\n12-22 14:42:25.493 17606 17606 W System.err: com.tns.Runtime.runModule(Native Method)\r\n12-22 14:42:25.493 17606 17606 W System.err: com.tns.Runtime.runModule(Runtime.java:514)\r\n12-22 14:42:25.493 17606 17606 W System.err: com.tns.Runtime.run(Runtime.java:509)\r\n12-22 14:42:25.493 17606 17606 W System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17)\r\n12-22 14:42:25.493 17606 17606 W System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)\r\n12-22 14:42:25.493 17606 17606 W System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4751)\r\n12-22 14:42:25.493 17606 17606 W System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)\r\n12-22 14:42:25.493 17606 17606 W System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)\r\n12-22 14:42:25.493 17606 17606 W System.err: android.os.Handler.dispatchMessage(Handler.java:102)\r\n12-22 14:42:25.493 17606 17606 W System.err: android.os.Looper.loop(Looper.java:148)\r\n12-22 14:42:25.493 17606 17606 W System.err: android.app.ActivityThread.main(ActivityThread.java:5461)\r\n12-22 14:42:25.493 17606 17606 W System.err: java.lang.reflect.Method.invoke(Native Method)\r\n12-22 14:42:25.493 17606 17606 W System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n12-22 14:42:25.493 17606 17606 W System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n12-22 14:42:25.493 17606 17606 W System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class \"com.tns.NativeScriptActivity\" on path: DexPathList[[zip file \"/data/app/com.gethuman.android-1/base.apk\"],nativeLibraryDirectories=[/data/app/com.gethuman.android-1/lib/arm, /data/app/com.gethuman.android-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]\r\n12-22 14:42:25.493 17606 17606 W System.err: dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)\r\n12-22 14:42:25.494 17606 17606 W System.err: java.lang.ClassLoader.loadClass(ClassLoader.java:511)\r\n12-22 14:42:25.494 17606 17606 W System.err: java.lang.ClassLoader.loadClass(ClassLoader.java:469)\r\n12-22 14:42:25.494 17606 17606 W System.err: java.lang.Class.classForName(Native Method)\r\n12-22 14:42:25.494 17606 17606 W System.err: java.lang.Class.forName(Class.java:324)\r\n12-22 14:42:25.494 17606 17606 W System.err: java.lang.Class.forName(Class.java:285)\r\n12-22 14:42:25.494 17606 17606 W System.err: com.tns.Runtime.getClassForName(Runtime.java:947)\r\n12-22 14:42:25.494 17606 17606 W System.err: com.tns.ClassResolver.resolveClass(ClassResolver.java:50)\r\n12-22 14:42:25.494 17606 17606 W System.err: com.tns.Runtime.resolveClass(Runtime.java:565)\r\n12-22 14:42:25.494 17606 17606 W System.err: com.tns.Runtime.runModule(Native Method)\r\n12-22 14:42:25.494 17606 17606 W System.err: com.tns.Runtime.runModule(Runtime.java:514)\r\n12-22 14:42:25.494 17606 17606 W System.err: com.tns.Runtime.run(Runtime.java:509)\r\n12-22 14:42:25.494 17606 17606 W System.err: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17)\r\n12-22 14:42:25.494 17606 17606 W System.err: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)\r\n12-22 14:42:25.494 17606 17606 W System.err: android.app.ActivityThread.handleBindApplication(ActivityThread.java:4751)\r\n12-22 14:42:25.494 17606 17606 W System.err: android.app.ActivityThread.-wrap1(ActivityThread.java)\r\n12-22 14:42:25.494 17606 17606 W System.err: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)\r\n12-22 14:42:25.494 17606 17606 W System.err: android.os.Handler.dispatchMessage(Handler.java:102)\r\n12-22 14:42:25.494 17606 17606 W System.err: android.os.Looper.loop(Looper.java:148)\r\n12-22 14:42:25.494 17606 17606 W System.err: android.app.ActivityThread.main(ActivityThread.java:5461)\r\n12-22 14:42:25.494 17606 17606 W System.err: java.lang.reflect.Method.invoke(Native Method)\r\n12-22 14:42:25.494 17606 17606 W System.err: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n12-22 14:42:25.494 17606 17606 W System.err: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n12-22 14:42:25.494 17606 17606 W System.err: File: \"/data/data/com.gethuman.android/files/internal/ts_helpers.js, line: 104, column: 28\r\n12-22 14:42:25.494 17606 17606 W System.err: StackTrace: \r\n12-22 14:42:25.494 17606 17606 W System.err: \tFrame: function:'Interfaces.target.interfaces', file:'/data/data/com.gethuman.android/files/internal/ts_helpers.js', line: 104, column: 29\r\n12-22 14:42:25.494 17606 17606 W System.err: \tFrame: function:'__decorate', file:'/data/data/com.gethuman.android/files/app/services/delegate/delegate.js', line: 10, column: 95\r\n12-22 14:42:25.494 17606 17606 W System.err: \tFrame: function:'', file:'/data/data/com.gethuman.android/files/app/services/delegate/delegate.js', line: 84, column: 12\r\n12-22 14:42:25.494 17606 17606 W System.err: \tFrame: function:'require', file:'', line: 1, column: 266\r\n12-22 14:42:25.494 17606 17606 W System.err: \tFrame: function:'', file:'/data/data/com.gethuman.android/files/app/main.js', line: 9, column: 1\r\n12-22 14:42:25.494 17606 17606 W System.err: \tFrame: function:'require', file:'', line: 1, column: 266\r\n```\r\nNot sure what all that means 🤐 \r\n\r\n### Please tell us how to recreate the issue in as much detail as possible.\r\nCreating a new blank project does not produce this error; but I am extending the activity:\r\n```typescript\r\n@JavaProxy('com.tns.NativeScriptActivity')\r\nclass Activity extends android.app.Activity {}\r\n```\r\n\r\nI'm in the midst of trial and error removing parts of the app trying to get it to build. lol","author":{"url":"https://github.com/roblav96","@type":"Person","name":"roblav96"},"datePublished":"2016-12-22T19:48:59Z","url":"https://github.com/NativeScript/android/issues/665"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3b692d16-36b7-175b-8b8d-cd540085534f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFD8:3F8AB1:34E43D5:4338BBE:6B01C80A |
| html-safe-nonce | de1344b1741dc104ce9e4745a95d36a4a3634512ba703c45b6bb9f9805b60e19 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkQ4OjNGOEFCMTozNEU0M0Q1OjQzMzhCQkU6NkIwMUM4MEEiLCJ2aXNpdG9yX2lkIjoiODc3OTE3OTM2OTc3NzE4NjgyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 18b6bec4b566069cb7c9f0de4d2b947f5f4cc92eac3f0d5b07bd0e3e927969d8 |
| hovercard-subject-tag | issue:197253405 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/android/665/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e4b2a9b225a86b4b3077992a5cb2f7d34120116d78ece3a0b21689a946c859e7/NativeScript/android/issues/665 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e4b2a9b225a86b4b3077992a5cb2f7d34120116d78ece3a0b21689a946c859e7/NativeScript/android/issues/665 |
| og:image:alt | Please, provide the details below: Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo? Yes. Tell us about the problem Recently cleaned out my p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | roblav96 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/android git https://github.com/NativeScript/android.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 29137950 |
| octolytics-dimension-repository_nwo | NativeScript/android |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 29137950 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/android |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width