Api token missing - Android Studio .properties file

I have updated Android Studio to latest version and now Crowdin plug in is not working anymore. It is saying the api-token is missing. I checked and added the new identifier with numbers. I also created a new personal API token and pasted it into the properties file. Still says the ap-token is missing.

My crowdin.properties file:

project-id=111111
api-token=my_secret_api_token
auto-upload=false
disable-branches=true

files: [
 {
    "source" : "/res/values/strings.xml",                               #source files filter
    "translation" : "/res/values-%android_code%/%original_file_name%",  #where translations live
    "languages_mapping" : {
       "android_code" : {
         # crowdin expects directories to be like 'values-uk-rUA'
         "de" : "DE",
         "nb" : "NO",         # Norsk bokmål
         "fr" : "FR"         # Fransk generelt
        }
     } 
  }
]

What version do you use exactly? Have the API token you’ve created works with for example Crowdin’s stand alone API or CLI?

More info is needed. Like what steps you take, what permissions skopes are in token, what’s your project role, version of Studio, version of Plugin and so on…

Looks like you were updating from a very old version of the plugin where still was Crowidn API v1, and with update you did not rename the properties in configuration.

This one should explain a little

Notes

  1. For versions 0.5.x see the branch 0.5.x. Please note that these versions are no longer supported.
  2. Migration from version 0.5.x to 1.x.x requires changes in your crowdin.properties file.
1 Like

Yes. This is correct. I changed my configuration file to the new version. But still not working. It says ‘api-token’ is missing.

  • API permission is ALL.
  • I’m project owner.
  • Android Studio 2022.1.1 Patch 1
  • Crowdin 1.6.1 plugin

Even if I remove the files which seems from the old version, I get the same error message.

What errors you receive? Can this be reproduces in some test project? If you create a new one just for a scratch?

Thank you. I did and it worked fine. It was this code that was making the trouble:

auto-upload=false

After deleting this line, it worked.

1 Like

Glad to hear it worked. Can you share the logs of plugin? Just curious about what was there :slight_smile:

Where do I find the log?

Try this one How to find the logs on Android Studio? - Stack Overflow
On toolbar → Help MenuShow log in Explorer or Show log in Finder (for Mac users).

Thanks. I found it, but I could not find any logs for the plugin. I searched through some of the logs and did not find crowdin or plugin related to this. Do you know more specific which log you are after?

This should be a simple event log in ide
ide-log

I only find this in the log:

2023-02-24 10:04:54,179 [   7172]   INFO - #c.i.i.p.PluginManager - Loaded custom plugins: .ignore (4.4.0), Crowdin (1.6.1)
2023-02-24 10:05:29,475 [  42468]   WARN - #c.i.o.w.i.ToolWindowImpl - ToolWindow icons should be 13x13. Please fix ToolWindow (ID:  Crowdin) or icon ImageDataByPathLoader(classLoader=PluginClassLoader(plugin=PluginDescriptor(name=Crowdin, id=com.crowdin.crowdin-idea, descriptorPath=plugin.xml, path=~/.local/share/Google/AndroidStudio2022.1/Crowdin, version=1.6.1, package=null, isBundled=false), packagePrefix=null, instanceId=69, state=active), path=icons/icon.svg, original=null)
2023-02-24 10:05:59,348 [  72341]   INFO - #c.i.n.NotificationGroup - Notification group Crowdin is already registered
1 Like

Thanks for looking into it, really appreciated :slight_smile:

Glad to hear that all works fine now!