Giter VIP home page Giter VIP logo

barreeeiroo / appinventor-sources Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mit-cml/appinventor-sources

2.0 2.0 0.0 1.12 GB

MIT App Inventor Public Open Source

Home Page: http://appinventor.mit.edu/appinventor-sources/

License: Apache License 2.0

Java 66.56% Scheme 1.98% CSS 1.78% HTML 10.59% JavaScript 4.54% Python 1.46% Shell 0.12% Ruby 0.02% Dockerfile 0.01% Objective-C 4.61% Swift 8.17% SCSS 0.09% C 0.03% Makefile 0.01% Lex 0.01% Yacc 0.01% Batchfile 0.03%

appinventor-sources's Introduction

appinventor-sources's People

Contributors

afmckinney avatar barreeeiroo avatar bartmathijssen avatar beksomega avatar conorshipp avatar e-hon avatar ellelili2025 avatar ewpatton avatar fturbak avatar halatmit avatar jisqyv avatar josmas avatar karuto avatar kgarner7 avatar kkashi01 avatar klaverty avatar lizlooney avatar mark-friedman avatar marksherman avatar nicholec avatar pavi2410 avatar preetvadaliya avatar ram8647 avatar robinbattle avatar sharonperl avatar susanratilane avatar weihuali0509 avatar wolberd avatar wxbit avatar ylwu avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

appinventor-sources's Issues

AAPT2 is changing resources IDs

I solved the previous issue and even signed the AAB (to be suitable for Play Store). Currently, it can totally build the AAB and make it for production.
The only issue is the abc_vector_test one that I commented in the meeting.

So, after extracting the resources IDs from both AAB and normal APK, I found out that the IDs don't match. I've attached here the generates one from AAPT and AAPT2.

โœ… abc_vector_test = 0x7f020053
aapt.txt
โŒ abc_vector_test = 0x7f060053
aapt2.txt

All resources have different IDs, so I don't really know what's going on.

AAPT2 does not like custom resources...

I have been playing the past few days with this guide from Google. However, after sorting quite a few issues, I ran into this one, and I'm not sure if this might be the correct way to proceed with it.


Currently, I'm working in the gsoc20/build-aab branch. I have created the AabCompiler.java Callable class (thinking for future refactor) where I run specific AAB tasks. It first creates an the build/aab/ folder, preparing the structure for the AAB module.

Following the tutorial, the first step involves compiling the resource files using AAPT2:

aapt2 compile \
project_root/module_root/src/main/res/drawable/Image1.png \
project_root/module_root/src/main/res/drawable/Image2.png \
-o compiled_resources/

So, in https://github.com/barreeeiroo/appinventor-sources/blob/gsoc20/build-aab/appinventor/buildserver/src/com/google/appinventor/buildserver/AabCompiler.java#L192 I do so. The res_compiled/ folder gets created at the build/ level, not in the aab/ one.

The next step is to link all resources and "generate" an APK with all protobuf-encoded files which can be extracted later. So, what I do is https://github.com/barreeeiroo/appinventor-sources/blob/gsoc20/build-aab/appinventor/buildserver/src/com/google/appinventor/buildserver/AabCompiler.java#L212. I don't use the res_compiled/*.flat because the * wildcard is not supported on Windows.
And here comes the problem.

When running ant PlayAppAab (I just added that command to be able to test from command line) in that branch, errors like this start popping out:

error: style attribute 'attr/colorPrimary not found

And I found that it was because I did not have the attrs.xml file. So, I created it and started adding the attributes that were causing the errors: https://github.com/barreeeiroo/appinventor-sources/blob/gsoc20/build-aab/appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java#L772

The first issues were quite easy to solve, as they were "attr" type. However, then I got the same issue but for textAllCaps. I made the same (boolean type), but then this error appeared:

Attribute "textAllCaps" already defined with incompatible format.

Then after checking this file I ended up removing the format and worked.

But I was not able to get rid of these errors:

     [java] error: resource style/Theme.AppCompat.Light.Dialog.Alert (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.Dialog.Alert) not found.
     [java] error: resource style/Theme.AppCompat.Light.Dialog.Alert (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.Dialog.Alert) not found.
     [java] error: resource style/Theme.AppCompat.Light.Dialog.Alert (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.Dialog.Alert) not found.
     [java] error: resource style/Theme.AppCompat.Light.Dialog.Alert (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.Dialog.Alert) not found.
     [java] error: resource style/Theme.AppCompat.Light.Dialog (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.Dialog) not found.
     [java] error: resource style/Theme.AppCompat.Light.Dialog (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.Dialog) not found.
     [java] error: resource style/Theme.AppCompat.Light.Dialog (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.Dialog) not found.
     [java] error: resource style/Theme.AppCompat.Light.Dialog (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.Dialog) not found.
     [java] error: resource style/Theme.AppCompat.Light.DarkActionBar (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.DarkActionBar) not found.
     [java] error: resource style/Theme.AppCompat.Light.DarkActionBar (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.DarkActionBar) not found.
     [java] error: resource style/Theme.AppCompat.Light.DarkActionBar (aka edu.mit.appinventor.aicompanion3:style/Theme.AppCompat.Light.DarkActionBar) not found.
     [java] error: resource style/Widget.AppCompat.CompoundButton.Switch (aka edu.mit.appinventor.aicompanion3:style/Widget.AppCompat.CompoundButton.Switch) not found.
     [java] C:\Users\DIEGOB~1\AppData\Local\Temp\1592499516754_0.35972695033492474-0\youngandroidproject\..\build\res\values\styles.xml:10: error: resource drawable/abc_item_background_holo_light (aka edu.mit.appinventor.aicompanion3:drawable/abc_item_background_holo_light) not found.
     [java] error: resource style/TextAppearance.AppCompat (aka edu.mit.appinventor.aicompanion3:style/TextAppearance.AppCompat) not found.
     [java] error: resource style/TextAppearance.AppCompat (aka edu.mit.appinventor.aicompanion3:style/TextAppearance.AppCompat) not found.
     [java] error: resource style/TextAppearance.AppCompat (aka edu.mit.appinventor.aicompanion3:style/TextAppearance.AppCompat) not found.
     [java] error: resource style/TextAppearance.AppCompat (aka edu.mit.appinventor.aicompanion3:style/TextAppearance.AppCompat) not found.
     [java] error: resource style/TextAppearance.AppCompat (aka edu.mit.appinventor.aicompanion3:style/TextAppearance.AppCompat) not found.
     [java] error: failed linking references.

So, I am wondering if following that guide is the correct way to proceed, because they actually build a fake APK and then unpack it to extract the protocol-buffered files, so they can place it in the zip module to run bundletool.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.