linkedin / linkedin/dexmaker

dexcache == null error

Open
#12 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2k
Forks
262
PR merge metrics
No merged PRs in 30d

Description

This issue from the old google code project: https://code.google.com/p/dexmaker/issues/detail?id=2 is still valid as of the released 1.2 version

Java.lang.IllegalArgumentException: dexcache == null (and no default could be found; consider setting the 'dexmaker.dexcache' system property)
at com.google.dexmaker.DexMaker.generateAndLoad(DexMaker.java:359)
at com.google.dexmaker.stock.ProxyBuilder.buildProxyClass(ProxyBuilder.java:252)
at com.google.dexmaker.mockito.DexmakerMockMaker.createMock(DexmakerMockMaker.java:51)
at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:41)
...

However, I verified that it has been fixed in the current github repository (last commit March 12th 2015 - ca74669):

  • git clone https://github.com/crittercism/dexmaker.git
  • cd dexmaker
  • mvn install -Dmaven.test.skip=true
  • cp -R ~/.m2/repository/com/google/dexmaker $ANDROID_HOME/extras/android/m2repository/com/google
  • and then update project dependency to 1.3-SNAPSHOT

It would be nice to have a 1.3 release so that we can take the workaround lines out of the test setUp() methods:
System.setProperty("dexmaker.dexcache", getContext().getCacheDir().getPath());

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking the current behavior around DexMaker.generateAndLoad, ProxyBuilder.buildProxyClass, and DexmakerMockMaker.createMock, then inspect test setUp() methods using the dexmaker.dexcache workaround. Verify whether the fix is present and determine the repository's release steps; done means a 1.3 release is available and the workaround can be removed from the tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.