question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error loading version from resource "sdk-version.txt": Not found.

See original GitHub issue

I am migrating Dropbox Android V2 API from V1 in my existing project. I have follow this documentation. I have existing project developed with Eclipse. So i have downloaded “dropbox-core-sdk-3.0.3.jar” and “jackson-core-2.9.0.pr3.jar” files and added under lib folder. The V2 dropbox login process works fine and also Auth.getOAuth2Token() method return correct token.

But i am getting issue on calling DropboxClient.getClient(ACCESS_TOKEN) method. I am receiving follwing error…

java.lang.RuntimeException: Error loading version from resource “sdk-version.txt”: Not found.

Full Error Stack:

 FATAL EXCEPTION: AsyncTask #1
 Process: com.android.myapp, PID: 23428
 java.lang.RuntimeException: An error occured while executing doInBackground()
 	at android.os.AsyncTask$3.done(AsyncTask.java:304)
 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
 	at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
 	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 	at java.lang.Thread.run(Thread.java:818)
 Caused by: java.lang.ExceptionInInitializerError
 	at com.dropbox.core.DbxRequestUtil.buildUserAgentHeader(DbxRequestUtil.java:146)
 	at com.dropbox.core.DbxRequestUtil.addUserAgentHeader(DbxRequestUtil.java:131)
 	at com.dropbox.core.DbxRequestUtil.startPostRaw(DbxRequestUtil.java:228)
 	at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:100)
 	at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:256)
 	at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:97)
 	at com.dropbox.core.v2.users.DbxUserUsersRequests.getCurrentAccount(DbxUserUsersRequests.java:120)
 	at com.android.myapp.UserAccountTask.doInBackground(UserAccountTask.java:32)
 	at com.android.myapp.UserAccountTask.doInBackground(UserAccountTask.java:1)
 	at android.os.AsyncTask$2.call(AsyncTask.java:292)
 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 	... 4 more
 Caused by: java.lang.RuntimeException: Error loading version from resource "sdk-version.txt": Not found.
 	at com.dropbox.core.DbxSdkVersion.loadVersion(DbxSdkVersion.java:66)
 	at com.dropbox.core.DbxSdkVersion.<clinit>(DbxSdkVersion.java:17)
 	... 15 more


Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:25 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
tdtrancommented, Nov 17, 2017

I think there is a bug somewhere in Android Studio 3.0 (+ Android gradle plugin 3.0). The apk built by Android Studio when I hit “Run” does not have Java resource files merged correctly (Java resources, not Android res). I verified it by decompiling the apk. Java resource files, and not only those from Dropbox SDK lib, are not there. The apk file (both debug and release) built by running gradle on the command line is assembled correctly.

I haven’t been able to pinpoint what exactly causes this bug in AS but I disabled both Instant Run and gradle daemon and that seems to make the problem go away.

0reactions
greg-dbcommented, Apr 16, 2019

Thanks for the notes! cc/ @jiuyangzhao

Read more comments on GitHub >

github_iconTop Results From Across the Web

gradle - How to fix "Android resource linking failed" error in ...
I was getting AAPT: error: resource android:attr/lStar not found on a ... the Empty Activity template, targeting a min SDK version of 21....
Read more >
'Failed to list versions for com.facebook.react:react-native ...
The HyperText Transfer Protocol (HTTP) 410 Gone client error response code indicates that access to the target resource is no longer available ......
Read more >
AAPT2 - Android Developers
AAPT2 (Android Asset Packaging Tool) is a build tool that Android Studio and Android Gradle Plugin use to compile and package your app's ......
Read more >
NETSDK1141: Unable to resolve the .NET SDK version as ...
The SDK version specified in global.json could not be found, due to an incorrect path. How to fix the error. Install the SDK...
Read more >
Operator SDK FAQ
How do I wait for some specific cluster state such as a resource being deleted? ... If you are facing this issue, it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found