Sketchware-Pro / Sketchware-Pro

Sketchware Pro's sources in Java. Now anyone can contribute to Sketchware Pro.
https://sketchware.pro
Other
963 stars 292 forks source link

Issue #412

Closed TwilightAnimeTV closed 2 years ago

TwilightAnimeTV commented 2 years ago

There's no other issue on my side. It just it keep crashing when building apk and then it will not let me build it.

JavkhlanK commented 2 years ago

Can you upload /Internal storage/.sketchware/debug.txt here after getting Sketchware Pro to crash again?

bloom11 commented 2 years ago

Hi, I'm encountering the same issu when I try to compile a basic hello world type app. Sketchware display the nice compilation pop up with the compilation steps written at the bottom and once arrived at the last step, it crash making it impossible to compile anything. I'm using the last available version from github if I'm not wrong.

bloom11 commented 2 years ago

2022-05-24T08:40:49.260+0200 D/AppBuilder: Running Sketchware Pro v6.4.0-rc03 without AAB support (150) 2022-05-24T08:40:49.265+0200 D/AppBuilder: base.apk's size is 87,74ᅡᅠMo (87741026 B) 2022-05-24T08:40:49.286+0200 D/AppBuilder:c: Compiling built-in library resources took 1 ms 2022-05-24T08:40:49.288+0200 D/AppBuilder:cLLR: About to compile 0 local libraries 2022-05-24T08:40:49.290+0200 D/AppBuilder:c: Compiling local library resources took 2 ms 2022-05-24T08:40:49.292+0200 D/AppBuilder:cPR: Now executing: [/data/user/0/com.sketchware.remod/cache/aapt2, compile, --dir, /storage/emulated/0/.sketchware/mysc/601/app/src/main/res, -o, /storage/emulated/0/.sketchware/mysc/601/bin/res/project.zip] 2022-05-24T08:40:49.371+0200 D/AppBuilder:c: Compiling project generated resources took 80 ms 2022-05-24T08:40:49.375+0200 D/AppBuilder:c: Compiling project imported resources took 1 ms 2022-05-24T08:40:49.380+0200 D/AppBuilder:l: [/data/user/0/com.sketchware.remod/cache/aapt2, link, --allow-reserved-package-id, --auto-add-overlay, --no-version-vectors, --no-version-transitions, --min-sdk-version, 21, --target-sdk-version, 28, --version-code, 1, --version-name, 1.0, -I, /data/user/0/com.sketchware.remod/cache/libs/android.jar, -A, /storage/emulated/0/.sketchware/mysc/601/app/src/main/assets, -R, /storage/emulated/0/.sketchware/mysc/601/bin/res/project.zip, -R, /storage/emulated/0/.sketchware/mysc/601/bin/res/project.zip, --java, /storage/emulated/0/.sketchware/mysc/601/gen, --proguard, /storage/emulated/0/.sketchware/mysc/601/bin/aapt_rules.pro, --manifest, /storage/emulated/0/.sketchware/mysc/601/app/src/main/AndroidManifest.xml, -o, /storage/emulated/0/.sketchware/mysc/601/bin/NewProject.apk.res] 2022-05-24T08:40:50.019+0200 D/AppBuilder:c: Linking resources took 643 ms 2022-05-24T08:40:50.021+0200 D/AppBuilder: Compiling resources took 737 ms 2022-05-24T08:40:50.140+0200 D/AppBuilder: Running Eclipse compiler with these arguments: [-1.7, -nowarn, -deprecation, -d, /storage/emulated/0/.sketchware/mysc/601/bin/classes, -cp, /data/user/0/com.sketchware.remod/cache/libs/android.jar:/data/user/0/com.sketchware.remod/cache/libs/libs/http-legacy-android-28/classes.jar:, -proc:none, /storage/emulated/0/.sketchware/mysc/601/app/src/main/java, /storage/emulated/0/.sketchware/mysc/601/gen, /storage/emulated/0/.sketchware/data/601/files/java] 2022-05-24T08:40:52.936+0200 D/AppBuilder: System.out of Eclipse compiler: 2022-05-24T08:40:52.938+0200 D/AppBuilder: System.err of Eclipse compiler: ----------

  1. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/MainActivity.java (at line 6) import android.app.DialogFragment; ^^^^^^^^^^^^^^^^^^^^^^^^^^ The type DialogFragment is deprecated

  2. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/MainActivity.java (at line 7) import android.app.Fragment; ^^^^^^^^^^^^^^^^^^^^ The type Fragment is deprecated

  3. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/MainActivity.java (at line 8) import android.app.FragmentManager; ^^^^^^^^^^^^^^^^^^^^^^^^^^^ The type FragmentManager is deprecated


  4. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/SketchwareUtil.java (at line 22) View _view = _toast.getView(); ^^^^^^^^^ The method getView() from the type Toast is deprecated

  5. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/SketchwareUtil.java (at line 31) _view.setBackgroundDrawable(_gradientDrawable); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The method setBackgroundDrawable(Drawable) from the type View is deprecated

  6. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/SketchwareUtil.java (at line 53) View _view = _toast.getView(); ^^^^^^^^^ The method getView() from the type Toast is deprecated

  7. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/SketchwareUtil.java (at line 64) _view.setBackgroundDrawable(_gradientDrawable); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The method setBackgroundDrawable(Drawable) from the type View is deprecated

  8. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/SketchwareUtil.java (at line 126) NetworkInfo _activeNetworkInfo = _connectivityManager.getActiveNetworkInfo(); ^^^^^^^^^^^ The type NetworkInfo is deprecated

  9. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/SketchwareUtil.java (at line 126) NetworkInfo _activeNetworkInfo = _connectivityManager.getActiveNetworkInfo(); ^^^^^^^^^^^^^^^^^^^^^^ The method getActiveNetworkInfo() from the type ConnectivityManager is deprecated

  10. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/SketchwareUtil.java (at line 127) return _activeNetworkInfo != null && _activeNetworkInfo.isConnected(); ^^^^^^^^^^^^^ The method isConnected() from the type NetworkInfo is deprecated

  11. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/SketchwareUtil.java (at line 148) _inputMethodManager.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The method toggleSoftInput(int, int) from the type InputMethodManager is deprecated

  12. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/SketchwareUtil.java (at line 153) _inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The method toggleSoftInput(int, int) from the type InputMethodManager is deprecated


  13. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/FileUtil.java (at line 232) return Environment.getExternalStorageDirectory().getAbsolutePath(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The method getExternalStorageDirectory() from the type Environment is deprecated

  14. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/FileUtil.java (at line 240) return Environment.getExternalStoragePublicDirectory(type).getAbsolutePath(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The method getExternalStoragePublicDirectory(String) from the type Environment is deprecated

  15. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/FileUtil.java (at line 252) path = Environment.getExternalStorageDirectory() + "/" + split[1]; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The method getExternalStorageDirectory() from the type Environment is deprecated

  16. WARNING in /storage/emulated/0/.sketchware/mysc/601/app/src/main/java/com/patatino/test/FileUtil.java (at line 305) final String column = MediaStore.Images.Media.DATA; ^^^^ The field MediaStore.MediaColumns.DATA is deprecated

    16 problems (16 warnings)

2022-05-24T08:40:52.961+0200 D/AppBuilder: Compiling Java files took 2938 ms 2022-05-24T08:40:53.003+0200 D/AppBuilder: Running Dx with these arguments: [--debug, --verbose, --multi-dex, --output=/storage/emulated/0/.sketchware/mysc/601/bin/dex, /storage/emulated/0/.sketchware/mysc/601/bin/classes] processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/DebugActivity.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/DebugActivity$1.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/FileUtil.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/MainActivity.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/MainActivity$1.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/R.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/R$color.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/R$drawable.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/R$id.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/R$layout.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/R$string.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/R$style.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/SketchApplication.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/SketchApplication$1.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/SketchwareUtil.class... processing /storage/emulated/0/.sketchware/mysc/601/bin/classes/./com/patatino/test/SketchwareUtil$1.class... 2022-05-24T08:40:53.466+0200 D/AppBuilder: Dx took 467 ms 2022-05-24T08:40:53.472+0200 D/AppBuilder: Will merge these 2 DEX files to classes.dex: [/data/user/0/com.sketchware.remod/cache/libs/dexs/http-legacy-android-28.dex, /storage/emulated/0/.sketchware/mysc/601/bin/dex/classes.dex] 2022-05-24T08:40:53.476+0200 D/AppBuilder: Merging project DEX file(s) and libraries' took 7 ms Packaging NewProject.apk.unsigned /storage/emulated/0/.sketchware/mysc/601/bin/NewProject.apk.res: => AndroidManifest.xml => res/drawable-xhdpi-v4/app_icon.png => res/drawable-xhdpi-v4/default_image.png => res/layout/main.xml => resources.arsc /data/user/0/com.sketchware.remod/cache/libs/dexs/http-legacy-android-28.dex => classes.dex /storage/emulated/0/.sketchware/mysc/601/bin/dex/classes.dex => classes2.dex 2022-05-24T08:40:53.556+0200 D/AppBuilder: Time passed since starting to compile resources until building the unsigned APK: 4272 ms 2022-05-24T08:40:53.558+0200 D/AppBuilder: About to zipalign /storage/emulated/0/.sketchware/mysc/601/bin/NewProject.apk.unsigned to /storage/emulated/0/.sketchware/mysc/601/bin/NewProject.apk.unsigned.aligned 2022-05-24T08:40:54.368+0200 D/AppBuilder: zipalign took 808 ms Failed to load signer "signer #1" java.io.FileNotFoundException: /data/user/0/com.sketchware.remod/files/libs/testkey/testkey.pk8: open failed: ENOENT (No such file or directory) at libcore.io.IoBridge.open(IoBridge.java:492) at java.io.FileInputStream.(FileInputStream.java:160) at com.android.apksigner.SignerParams.readFully(SignerParams.java:500) at com.android.apksigner.SignerParams.loadPrivateKeyAndCertsFromFiles(SignerParams.java:404) at com.android.apksigner.SignerParams.loadPrivateKeyAndCerts(SignerParams.java:183) at com.android.apksigner.ApkSignerTool.getSignerConfig(ApkSignerTool.java:405) at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:324) at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:88) at mod.alucard.tn.apksigner.ApkSigner.signWithTestKey(ApkSigner.java:61) at com.besome.sketch.design.DesignActivity$BuildAsyncTask.b(DesignActivity.java:1079) at a.a.a.MA.a(Unknown Source:11) at com.besome.sketch.design.DesignActivity$BuildAsyncTask.doInBackground(DesignActivity.java:1176) at com.besome.sketch.design.DesignActivity$BuildAsyncTask.doInBackground(DesignActivity.java:880) at android.os.AsyncTask$3.call(AsyncTask.java:394) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923) Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory) at libcore.io.Linux.open(Native Method) at libcore.io.ForwardingOs.open(ForwardingOs.java:166) at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254) at libcore.io.ForwardingOs.open(ForwardingOs.java:166) at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8494) at libcore.io.IoBridge.open(IoBridge.java:478) ... 18 more

JavkhlanK commented 2 years ago

@bloom11, Issue #413 has a workaround for that bug in Sketchware Pro v6.4.0-rc03. It's been fixed already, just needs to be released.