swagger-api / swagger-api/swagger-codegen

Android Volley Generator

Open
#2,998 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Android help wanted Issue: Bug
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

HI, i've generated an Android client with volley library using the swagger generator (from windows). Everything went fine but when i try to call the API i get this error:
"java.lang.NoClassDefFoundError: org.apache.http.Consts at io.swagger.client.ApiInvoker. .."

I've tried to use the PetStore Sample and i get the same error.
I've tried to use okhttp-gson and i have the same problem.
I've created a clean project to test the jar and i have the same error.

Am i doing something wrong?

My project use the androdi 23 sdk, i've added the jar generated in the libs folder of my project.

Swagger-codegen version

Lastest from master and 2.1.6

Swagger declaration file content or url

Use PetStore sample json

Command line used for generation

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i "json-path" -l android --library=volley -o "project-path"

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 with the generated Android Volley client's ApiInvoker entry point and reproduce the failure in the clean Android 23 project using the PetStore sample and the reported generation command. Compare the generated client's runtime dependencies with the project setup; done means the missing-class cause is confirmed and the client can be invoked successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
api, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.