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

Could not find any app icons on android #73

Closed
deno028 opened this issue Apr 18, 2018 · 5 comments
Closed

Could not find any app icons on android #73

deno028 opened this issue Apr 18, 2018 · 5 comments

Comments

@deno028
Copy link

deno028 commented Apr 18, 2018

I use it in my React Native project with fastlane. It works fine on IOS but android.

Console output:
DEBUG [2018-04-18 11:16:42.08]: Parameters: {:dark=>true, :glob=>"/android/app/src/main/res/mipmap-*/ic_launcher.png", :alpha=>nil, :alpha_channel=>nil, :custom=>nil, :no_badge=>nil, :badge_gravity=>nil, :shield=>nil, :shield_io_timeout=>nil, :shield_geometry=>nil, :shield_gravity=>nil, :shield_scale=>nil, :shield_no_resize=>nil, :grayscale=>false}
ERROR [2018-04-18 11:16:42.08]: Could not find any app icons...

The same result with or without glob option.
--glob "/android/app/src/main/res/mipmap-*/ic_launcher.png"

These files exist in my app:
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

@deno028
Copy link
Author

deno028 commented Apr 18, 2018

Added "." at the beginning of path solved my problem. Not sure why the document mentioned only set "/" instead.

add_badge(
dark: true,
glob: "./android/app/src/main/res/mipmap-*/ic_launcher.png",
)

@razvangazi
Copy link

razvangazi commented Sep 29, 2018

I'm getting the same issue, but adding the . did not fix it for me... Any suggestions?

EDIT:
MY SOLUTION:

I made it work with glob: "./ ** /res/ ** /ic_launcher.{png,PNG}" (remove the spaces between / and **)

Cheers

@HazAT
Copy link
Owner

HazAT commented Nov 27, 2018

Closing this since the issue seems to be fixed.

@HazAT HazAT closed this as completed Nov 27, 2018
@jdcookie
Copy link

I'm getting the same issue, but adding the . did not fix it for me... Any suggestions?

EDIT:
MY SOLUTION:

I made it work with glob: "./ ** /res/ ** /ic_launcher.{png,PNG}" (remove the spaces between / and **)

Cheers

I needed a slight tweak, and maybe this is useful for anyone else searching here, scoped it just to the 'android' folder so it didn't overwrite my originals (multi-tenant app with many different tenants and source files) and covers the round icons too.

lane :badges do |options|
    add_badge(
      grayscale: true,
      shield: "#{options[:env].upcase}-#{ENV['ENV_MARKETING_VERSION']}.#{ENV['ANDROID_VERSION']}-blue",
      shield_scale: "0.90",
      glob: "./android/**/res/**/{ic_launcher,ic_launcher_round}.{png,PNG}"

    )
  end

@dandre-hound
Copy link

I actually had to remove the leading . in my case:

ANDROID_APP_ICON_GLOB_PATH = "/android/app/src/main/res/mipmap-*/{ic_launcher,ic_launcher_round}.{png,PNG}"

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

No branches or pull requests

5 participants