sitewhere / sitewhere-android-sdk Goto Github PK
View Code? Open in Web Editor NEWSiteWhere Android SDK
License: Other
SiteWhere Android SDK
License: Other
Hi,
I'm not superexperience in programming so I might just be overlooking something ridiculously stupid. But when I load the Example Program, it doesnt compile. First it complains about miltidexing, then it cant see classes in com.google.protobuf:protobuf-java:2.5.0, etc etc etc.
Did anyone else try to compile this in the newest android studi, and if yes, did it work for you?
Kind Regards, JSN
Please get me example of code.
Server verify failed: Unable to connect to server
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.sitewhere.server.SiteWhereServer"
when i run this demo it shows thant 'Server verify failed unable to connect to sever ' , what should i do ?
E/SiteWhereConnectivity: SiteWhere version call failed.
com.sitewhere.spi.SiteWhereException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "gitRevisionAbbrev" (class com.sitewhere.rest.model.system.Version), not marked as ignorable (5 known properties: "buildTimestamp", "versionIdentifier", "serverClass", "edition", "editionIdentifier"])
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 51] (through reference chain: com.sitewhere.rest.model.system.Version["gitRevisionAbbrev"])
at com.sitewhere.rest.client.SiteWhereClient.processRestCall(SiteWhereClient.java:523)
at com.sitewhere.rest.client.SiteWhereClient.getSiteWhereVersion(SiteWhereClient.java:152)
at com.sitewhere.android.example.ConnectivityWizardFragment$HostVerifier.run(ConnectivityWizardFragment.java:665)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:459)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "gitRevisionAbbrev" (class com.sitewhere.rest.model.system.Version), not marked as ignorable (5 known properties: "buildTimestamp", "versionIdentifier", "serverClass", "edition", "editionIdentifier"])
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 51] (through reference chain: com.sitewhere.rest.model.system.Version["gitRevisionAbbrev"])
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:822)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1152)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1582)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1560)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1611)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1203)
at retrofit2.converter.jackson.JacksonResponseBodyConverter.convert(JacksonResponseBodyConverter.java:32)
at retrofit2.converter.jackson.JacksonResponseBodyConverter.convert(JacksonResponseBodyConverter.java:23)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:223)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:186)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ExecutorCallAdapterFactory.java:92)
at com.sitewhere.rest.client.SiteWhereClient.processRestCall(SiteWhereClient.java:516)
at com.sitewhere.rest.client.SiteWhereClient.getSiteWhereVersion(SiteWhereClient.java:152)
at com.sitewhere.android.example.ConnectivityWizardFragment$HostVerifier.run(ConnectivityWizardFragment.java:665)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:459)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
When I build an ISiteWhereClient and initialized, is the login status successful? How do I get token?
after when i use ISiteWhereClient initialized , Futere.get() code throws an exception.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Caused by: java.util.concurrent.ExecutionException: com.sitewhere.spi.SiteWhereException: Exception obtaining JWT.
at java.util.concurrent.FutureTask.report(FutureTask.java:94)
at java.util.concurrent.FutureTask.get(FutureTask.java:164)
at com.zt.ztadvertisement.activity.newAct.SmallMainActivity.sitWhereLogin(SmallMainActivity.kt:454)
at com.zt.ztadvertisement.activity.newAct.SmallMainActivity.access$sitWhereLogin(SmallMainActivity.kt:49)
at com.zt.ztadvertisement.activity.newAct.SmallMainActivity$onMQTTServiceReady$1.run(SmallMainActivity.kt:340)
at android.os.Handler.handleCallback(Handler.java:755)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6141)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Caused by: com.sitewhere.spi.SiteWhereException: Exception obtaining JWT.
at com.sitewhere.rest.client.SiteWhereClient.initialize(SiteWhereClient.java:556)
at com.zt.ztadvertisement.activity.newAct.SmallMainActivity$SiteWhereClientConnector.call(SmallMainActivity.kt:590)
at com.zt.ztadvertisement.activity.newAct.SmallMainActivity$SiteWhereClientConnector.call(SmallMainActivity.kt:579)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.net.UnknownHostException: Unable to resolve host "iot.dtznjg.com": No address associated with hostname
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:125)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74)
at java.net.InetAddress.getAllByName(InetAddress.java:752)
at okhttp3.Dns$1.lookup(Dns.java:40)
at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:185)
at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.java:149)
at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:84)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:214)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at com.sitewhere.rest.client.SiteWhereClient$1.intercept(SiteWhereClient.java:575)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
at okhttp3.RealCall.execute(RealCall.java:92)
at retrofit2.OkHttpCall.execute(OkHttpCall.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.