Android Question Resource folder - the app can't find this folder

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear friends,

I get error:
invalid resource directory name ..\resource ic_add_alert_black_18dp.png

If I am using resource Folder, where I must put the directory "resource", Please?
Thank you
p4ppc

B4A Version: 8.30
Parsing code. (0.00s)
Compiling code. (0.08s)

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. Error
invalid resource directory name: ..\resource ic_add_alert_black_18dp.png
invalid resource directory name: ..\resource ic_error_black_18dp.png
invalid resource directory name: ..\resource ic_error_outline_black_18dp.png
invalid resource directory name: ..\resource ic_warning_black_18dp.png
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Are these resources that you are bringing into the project, or are they part of a library you are using?

- Colin.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
OK, looking at the example code it say "#AdditionalRes: ..\Resource" - so that's a relative path, up one from the project (but that doesn't make much sense to me, so might not be right). Just put the resource folder wherever you want & change the path in the #AdditionalRes statement.

So just create a Resource directory in your project & then put an absolute path to it. Eg: If your project folder is C:\Projects\Droppy, create a C:\Projects\Droppy\Resource & then put:

B4X:
#AdditionalRes: C:\Projects\Droppy\Resource

Having said that, I thought .aar files were supposed to contain all the resources anyway - so I'm not sure why the additional Resources are required.

- Colin.
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
ComputerSmith64 - thank you for your answer,

absolute path - this was one of all of my tests and it is not functioned. Maybe I am doing something wrong, but I thing that with
placement of folder is not possible to do some big mistake :rolleyes:

Thank you very much
p4ppc
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
ComputerSmith64 - thank you for your answer,

absolute path - this was one of all of my tests and it is not functioned. Maybe I am doing something wrong, but I thing that with
placement of folder is not possible to do some big mistake :rolleyes:

Thank you very much
p4ppc
Hmmm - folder names might be case sensitive... (not sure on that one)

- Colin.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
OK - so I had a play around with the project & couldn't work out where to put the Resource folder either. There are a couple of ways you can get it to work:

1) Copy the 4 image files from Resource to Droppy\Objects\res\drawable & make them read-only (otherwise they will get deleted when the app compiles); or
2) Copy the 4 image files from Resource to Droppy\Files & then add them to your project using the Add Files button at the bottom of the Files Manager tab in B4A.

Oh - & don't forget to comment out the #AdditionalRes line in the code & clean the project before you recompile.

- Colin.
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
ComputerSmith64

thank you very much, but both I have tried :) and nothing
I get this message:
AndroidManifest.xml:14: error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.AppCompat').
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
I am uploading project, please see in attachement -
 

Attachments

  • droppy.zip
    83 KB · Views: 249
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
You did not add AppCompat to your app.
 

Attachments

  • DroppyEx.zip
    12.3 KB · Views: 273
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
DonManfred and ComputerSmith,

I will learn this point, thank you very much for your time and advices.
p4ppc
 
Upvote 0
Top