Comments (13)
What happens when you combine the two?
from ig-json-parser.
Butterknife doesn't working.
from ig-json-parser.
I'm using both together without a problem. I don't believe I had to make any changes either. Have you confirmed that IG JSON Parser is working properly on its own?
from ig-json-parser.
My json models are in the android app module and if gradle task for ig-json-parser is uncommented, than it's generate correctly the models and I get NullPointerException for every view, but if I comment this, than work.
from ig-json-parser.
I think you need to put IG parser in its own module. Now that I think about it, I did run into an issue w/ the java gradle plugin causing some kind of incompatibility when merge with the main build.gradle. I know the IG folks use the parser in this way too as not to expose the models' members with default visibility. Here's how we have it set up.
from ig-json-parser.
Okay, maybe it will be good, but now my classes don't see generated files in model modul.
Could you share this part of your gradle script?
from ig-json-parser.
settings.gradle
include ':tastemade'
include ':tastemade:jsonModels'
app module build.gradle
apply plugin: 'android'
android {
...
}
dependencies {
compile 'com.jakewharton:butterknife:5.1.2'
compile project(':tastemade:jsonModels')
...
}
jsonModels module build.gradle
apply plugin: 'java'
ext {
generatedSourcesDir = file("gen-src/main/java")
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
gensrc {
java {
srcDir 'gen-src/main/java'
}
}
}
compileJava {
doFirst {
// Directory should exists before compilation started.
generatedSourcesDir.mkdirs()
}
options.compilerArgs += [
'-processor',
'com.instagram.common.json.annotation.processor.JsonAnnotationProcessor',
'-s',
generatedSourcesDir
]
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
dependencies {
compile 'com.instagram:ig-json-parser-processor:0.0.3'
}
from ig-json-parser.
Hello,
I have the same problem.
I did everything you wrote, but my app modul can't see the properly generated helper methods, just the models I wrote.
Do you have any advice?
thx,
Szöszi
from ig-json-parser.
I have same problem :(
from ig-json-parser.
Sorry for the late response. Generally, we do indeed put the models in separate modules to avoid inadvertent access to package-privacy fields. However, there should be nothing that requires that behavior.
Unsure what's going on with the interaction with Butterknife, I will try it out when I get a chance.
In the meanwhile, I pushed a change so that the jar file tells the compiler how to invoke the annotation processor. Maybe that will help the issue? LMK!
from ig-json-parser.
Specifically, 86f29b5
from ig-json-parser.
Sorry, but it's the same.
from ig-json-parser.
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
from ig-json-parser.
Related Issues (20)
- Error while compile release apk with proguard HOT 6
- Allow JsonField to be used as a parameter annotation (enhancement request) HOT 2
- annotation null pointer exception when List is used as @JsonField in Eclipse HOT 8
- Jackson annotations? HOT 2
- List of enums HOT 4
- The Guava Dependency adds 15k methods, can you reduce this? HOT 14
- Failing build HOT 4
- Support sub types? HOT 5
- This library is not compatible JDK7 anymore HOT 4
- retrofit 2 integration ? HOT 8
- JDK Compatibility Error HOT 4
- using with annotationProcessor from android studio 3.0 HOT 4
- A Crash While getting image from mobile to server while replyinh in personal DM. HOT 2
- Unable to build project: Could not resolve com.github.instagram.ig-json-parser:processor:master-SNAPSHOT HOT 2
- Bintray is shutting down
- Who wrote the upload section of Instagram? HOT 1
- If this wasn’t you, you can secure your account from a device you’ve logged in with in the past.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ig-json-parser.