Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing Project Configurations #1

Closed
SDRausty opened this issue Jul 30, 2019 · 23 comments
Closed

Parsing Project Configurations #1

SDRausty opened this issue Jul 30, 2019 · 23 comments

Comments

@SDRausty
Copy link
Contributor

SDRausty commented Jul 30, 2019

BuildAPKs could parse project configuration files to integrate libraries:

  1. Some of the configuration files are:
  • app/build.gradle
  • build.gradle
  • gradle/wrapper/gradle-wrapper.properties
  • proguard-project.txt
  • proguard.cfg
  • project.properties

What other configuration files desire parsing?

  1. How should libraries be handled by BuildAPKs:
  • Should libraries be downloaded, symlinked and linked into the project that is being compiled?
  • Should the libraries be downloaded, cached and unpacked into the source code? This method may be more transparent while working with the project sourcecode.
  1. How should the build scripts integrate the tasks of parsing, downloading and linking these libraries into each individual project? Device space is important while working with multiple projects.
@SDRausty
Copy link
Contributor Author

SDRausty commented Aug 8, 2019

Warning: A script that uses a library does not run as quickly as it would if all the code were contained within a single script project. Although libraries can make development and maintenance more convenient, you should use them sparingly in projects where speed is critical. Because of this issue, library use should be limited in add-ons.

Reference https://developers.google.com/apps-script/guides/libraries

@SDRausty
Copy link
Contributor Author

SDRausty commented Sep 24, 2019

Some frequent errors are:

number of errors / type of error
4813 error: Error: No resource found that matches the given name: attr 'colorPrimary'.
4800 error: Error: No resource found that matches the given name: attr 'colorPrimaryDark'.
4773 error: Error: No resource found that matches the given name: attr 'colorAccent'.
4518 error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
575 error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.

@SDRausty
Copy link
Contributor Author

SDRausty commented Oct 22, 2019

@HemanthJabalpuri thank you for sharing these links. I wanted to parse them, so I used the raw portal, i.e. https://raw.githubusercontent.com/t-arn/java-ide-droid/master/0_build-prod.bat

Since adding artifacts and libraries is one of a few ways to resolve building source code that depends on libraries and artifacts, this issue #2 is open to resolve parsing project configuration files by adding artifacts.

@SDRausty
Copy link
Contributor Author

In comment #1 (comment)_ the number of errors are condensed by type of error. What is the minumun required to resolve errors 1, 2 and 3?

@HemanthJabalpuri
Copy link

In comment #1 (comment)_ the number of errors are condensed by type of error. What is the minumun required to resolve errors 1, 2 and 3?

@SDRausty
I will tell you the detailed steps for this in a week as a new repo of me.
Above errors are because of appcmpat library is missing.

@HemanthJabalpuri
Copy link

@SDRausty
See this https://github.com/HemanthJabalpuri/AndroidExplorer.

@SDRausty
Copy link
Contributor Author

SDRausty commented Oct 25, 2019

@SDRausty
Copy link
Contributor Author

SDRausty commented Oct 25, 2019

@HemanthJabalpuri modifying android.jar might be better than adding libraries. Hence #3 is created...

@SDRausty
Copy link
Contributor Author

SDRausty commented Oct 25, 2019

add support for

Adding support for APK projects can be resolved in many ways. The following topics are created in seeking routes toward integration:

@SDRausty
Copy link
Contributor Author

SDRausty commented Oct 30, 2019

This d3b5e22 commit adds a simple database with instructions to https://github.com/BuildAPKs to assist in parsing projects. A goal is building the ENAMES file. The README.md has instructions and information.

@SDRausty
Copy link
Contributor Author

SDRausty commented Nov 29, 2019

This aa2fde9 commit, and accompanying commits in shlibs.sh and shlibs.bash create B*NAMES files in ~/buildAPKs/var/db with this workset:

  • login
  • build date
  • download size
  • build time
  • number of AndroidManifest.xml files found
  • number of APKs built
  • names of built APKs

@SDRausty
Copy link
Contributor Author

SDRausty commented Nov 30, 2019

This https://github.com/BuildAPKs/db.BuildAPKs repository is created to assit in parsing repository files. File opt/db/BNAMES holds statistics: GitHub login, build time, repository projects *.tar.gz download size, AndroidManifest.xml files found and built APKs found for each login that successfully built APK on device.

@SDRausty
Copy link
Contributor Author

SDRausty commented Dec 14, 2019

@HemanthJabalpuri any comments about ~/buildAPKs/build.github.bash https://github.com/HemanthJabalpuri shall hopefully be helpful:

detailed steps
Above errors are because of appcmpat library is missing.

Loading artifacts and libraries into the compilation: Adding 0 artifacts and libraries from directory /data/data/com.termux/files/home/buildAPKs/var/cache/lib into build main: Adding 545 artifacts and libraries from directory /system into build main: DONE

Screenshot_20191213-212441

@SDRausty
Copy link
Contributor Author

Beginning build in /data/data/com.termux/files/home/buildAPKs/sources/github/users/hemanthjabalpuri/HemanthJabalpuri-AndroidExplorer-3bf49e5                                                                                                                                                    
Loading artifacts and libraries into the compilation:  Adding 3 artifacts and libraries from directory /data/data/com.termux/files/home/buildAPKs/var/cache/lib into build HemanthJabalpuri-AndroidExplorer-3bf49e5:  Adding 9 artifacts and libraries from directory /data/data/com.termux/files/home/buildAPKs/sources/github/users/hemanthjabalpuri/HemanthJabalpuri-AndroidExplorer-3bf49e5/libs into build HemanthJabalpuri-AndroidExplorer-3bf49e5:  Adding 553 artifacts and libraries from directory /system into build HemanthJabalpuri-AndroidExplorer-3bf49e5: DONE
Loading artifacts and libraries into the compilation:  Adding 3 artifacts and libraries from directory /data/data/com.termux/files/home/buildAPKs/var/cache/lib into build main:  Adding 547 artifacts and libraries from directory /system into build main: DONE
[22:09lib]$ pwd                               
/data/data/com.termux/files/home/buildAPKs/var/cache/lib                                        
[22:09lib]$ ls                                                                                  
appcompat-1.0.2.aar  emoji-appcompat-1.0.0.aar  test-services-1.0.0.apk                         
[22:09lib]$ grep -ir "Theme.AppCompat.Light.DarkActionBar" *r
[22:09lib]$ grep -ir "Theme.AppCompat.Light.DarkActionBar" *k
Binary file test-services-1.0.0.apk matches
res/values/styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.DarkActionBar'.
res/values/styles.xml:9: error: Error: No resource found that matches the given name: attr 'colorAccent'.
res/values/styles.xml:8: error: Error: No resource found that matches the given name: attr 'colorPrimary'.                                                                                                                                                                                      
res/values/styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.                                                                                                                                          
res/values/styles.xml:8: error: Error: No resource found that matches the given name: attr 'colorAccent'.                                                                                                                                                                                       res/values/styles.xml:6: error: Error: No resource found that matches the given name: attr 'colorPrimary'.                                                                                                                                                                                      res/values/styles.xml:7: error: Error: No resource found that matches the given name: attr 'colorPrimaryDark'.

@HemanthJabalpuri
Copy link

@SDRausty
I don't know what's going wrong in your script.
I know only basic shell scripting.

You can build Android-Explorer app with build_old.sh and build_new.sh scripts from the repo.

Those are very basic scripts.

@SDRausty
Copy link
Contributor Author

SDRausty commented Dec 14, 2019

@HemanthJabalpuri the https://github.com/HemanthJabalpuri/AndroidExplorer/tree/master/libs directory is present, and:
Loading artifacts and libraries into the compilation: Adding 3 artifacts and libraries from directory /data/data/com.termux/files/home/buildAPKs/var/cache/lib into build HemanthJabalpuri-AndroidExplorer-3bf49e5: Adding 9 artifacts and libraries from directory /data/data/com.termux/files/home/buildAPKs/sources/github/users/hemanthjabalpuri/HemanthJabalpuri-AndroidExplorer-3bf49e5/libs into build HemanthJabalpuri-AndroidExplorer-3bf49e5: Adding 959 artifacts and libraries from directory /system into build HemanthJabalpuri-AndroidExplorer-3bf49e5: DONE

but the error persists

res/values/styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.DarkActionBar'.

and the resources are present

grep -ir "Theme.AppCompat.Light.DarkActionBar" HemanthJabalpuri-AndroidExplorer-3bf49e5/ HemanthJabalpuri-AndroidExplorer-3bf49e5/libs/res-appcompat/values/values.xml: <style name="Base.Theme.AppCompat.Light.DarkActionBar" parent="Base.Theme.AppCompat.Light"> HemanthJabalpuri-AndroidExplorer-3bf49e5/libs/res-appcompat/values/values.xml: <style name="Theme.AppCompat.Light.DarkActionBar" parent="Base.Theme.AppCompat.Light.DarkActionBar"/> HemanthJabalpuri-AndroidExplorer-3bf49e5/res/values/styles.xml: <style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">

So I am not sure what aapt package wants to know to compile.

I know only basic shell scripting.

I am impressed by your work @HemanthJabalpuri and I will continue to study grep -ir aapt HemanthJabalpuri-AndroidExplorer-3bf49e5/ in the hope of successfully compiling your projects on device.

@SDRausty
Copy link
Contributor Author

SDRausty commented Dec 14, 2019

@HemanthJabalpuri adding the following line to aapt package enables compilation of https://github.com/HemanthJabalpuri/AndroidExplorer:

--auto-add-overlay -S libs/res-appcompat -S libs/res-cardview -S libs/res-design -S libs/res-recyclerview \

It does not run as expected after granting phone permission for some unknown reason.

Screenshot_20191214-165723.png

Screenshot_20191214-165734.png

@SDRausty SDRausty changed the title Parsing Project Configuration Files Parsing Project Configurations Oct 18, 2021
SDRausty referenced this issue in SDRausty/buildAPKsApps Oct 18, 2021
SDRausty referenced this issue in SDRausty/buildAPKsApps Oct 18, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 18, 2021
SDRausty referenced this issue in SDRausty/buildAPKsApps Oct 19, 2021
SDRausty referenced this issue in shlibs/shlibs.sh Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.sh Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
@github-actions
Copy link

github-actions bot commented Feb 1, 2022

old issue sanse activity message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants