Script error

435 views
Skip to first unread message

Iaki yyo

unread,
Jan 6, 2022, 8:42:12 PM1/6/22
to DroidScript
Hi...
 
I have DS 2.5 and I have a problem when I try to build an AAB file. I have this error...

"Script error: Cannot read
properties of undefined
(reading 'includes')
Source: file://android_asset/DroidScript.js Line:
4365"

I think the error can be  when you build an app from  "New HTML app" then you build an aab file and the apkbuilder doesn't work. But if you build the app from "New JavaScript app" works fine.
I wonder if the error could be here with the app build from HTML.

Regards

Steve Garman

unread,
Jan 7, 2022, 3:41:04 AM1/7/22
to DroidScript
You are quite right that this only affects building HTML apps

There is a version of DroidScript with this problem fixed that you can download from
https://androidscript.org/beta/DroidScript_250b1/DroidScript_250p1.apk

That is the only change in that version

You do not need a new ApkBuilder plugin

Iaki yyo

unread,
Jan 7, 2022, 1:32:19 PM1/7/22
to DroidScript

It works now!

Thank you very much!

vu.di...@gmail.com

unread,
Jan 9, 2022, 10:28:48 PM1/9/22
to DroidScript
I installed the update and cleared the error seen above.
However, am receiving the following error when trying to build APK. (Updated APK builder to 2.02)

Script Error: Cannot read properties of undefined (reading 'split')
Source: file:///android_asset/Droidscript. Js Line: 4095

The project is an html project.

Steve Garman

unread,
Jan 10, 2022, 3:03:23 AM1/10/22
to DroidScript
Why 2.02?

Your ApkBuilder plugin should have the same version number as your DroidScript

For the most recent version of DroidScript that is 2.50

vu.di...@gmail.com

unread,
Jan 10, 2022, 10:24:08 AM1/10/22
to DroidScript
Thanks. My ApkBuilder plugin wasn't updating. I manually uninstalled, subscribed to premium, and reinstalled it. Things are working now.
--Vu

Greg Chapman

unread,
Feb 5, 2022, 10:24:46 AM2/5/22
to DroidScript
I also got the same line 4365 error, but I was trying to build the apk file. I did try the other version of DS mentioned in the reply but then the builder didn't get beyond 0%. What could I be doing wrong?
Thanks
GC

Nii Darko Darkoh

unread,
May 11, 2022, 9:11:04 AM5/11/22
to DroidScript
Note: This error happens to only HTML  apps
1. Do not uninstall anything
2. Close droidscript
3. Your ApkBuilder plugin should have the same version number as your DroidScript. For the most recent version of DroidScript that is 2.50
4. Reinstall DroidScript using  https://androidscript.org/beta/DroidScript_250b1/DroidScript_250p1.apk
5. reinstall the apkbiilder plugin from https://androidscript.org/apk/DroidScript_250/ApkBuilder_250.ppk
6. Restart DroidScript
7. Restart Phone
8. Build the Hello World JavaScript project first
9. Ensure your verson is in x.xx format not xxx format
10. Now try building your HTML app

This is what worked for me.

Jesse James

unread,
Oct 25, 2022, 2:25:53 AM10/25/22
to DroidScript
Hi Steve I downloaded the version of Droidscript you posted and it compiles the HTML  APKs and regualr APKs without error and even creates a AAB that works with Google Play but the target API is 30 and not 31 as required to publish to Google Play now.. Is there a way around this? Thank you, also was about to post about couldnt compile a valid AAB with the latest version of Droidscript but the old version you posted compiles AAB fineScreenshot_20221024-154405.png
Screenshot_20221025-011155.png
On Friday, January 7, 2022 at 8:41:04 AM UTC steve....@gmail.com wrote:

Jumar

unread,
Oct 26, 2022, 10:28:15 AM10/26/22
to DroidScript
Hi

On your project root directory, create a build.json file and paste this json object

{
    "manifest":
    {
        "minSdkVersion": 23,
        "targetSdkVersion": 31
    }
}

The compile your AAB again then upload to PlayStore.

Regards

Reply all
Reply to author
Forward
0 new messages