Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Crashed when no internet . #175

Open
SardarKhan299 opened this issue Mar 20, 2020 · 20 comments
Open

App Crashed when no internet . #175

SardarKhan299 opened this issue Mar 20, 2020 · 20 comments

Comments

@SardarKhan299
Copy link

When try to launch the app when there is no internet. app crashed here is the logcat messages.
Kindly fix this . thanks

03-20 21:00:37.906 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.net.UnknownHostException: Unable to resolve host "api.nlpte.ch": No address associated with hostname
03-20 21:00:37.906 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
03-20 21:00:37.916 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at java.lang.Thread.run(Thread.java:818)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: Caused by: java.net.UnknownHostException: Unable to resolve host "api.nlpte.ch": No address associated with hostname
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at java.net.InetAddress.lookupHostByName(InetAddress.java:440)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at java.net.InetAddress.getAllByName(InetAddress.java:215)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.Dns$Companion$SYSTEM$1.lookup(Dns.kt:48)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.kt:160)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.kt:125)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:71)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:199)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:109)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:77)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.connection.Transmitter.newExchange$okhttp(Transmitter.kt:162)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:35)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:84)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:71)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at com.nlptech.language.internal.RequestInterceptor.intercept()
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.kt:184)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at okhttp3.RealCall.execute(RealCall.kt:66)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at retrofit2.OkHttpCall.execute(OkHttpCall.java:186)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:45)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12267)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12267)
03-20 21:00:37.926 11509-11576/com.fasturduengemojikeyboard.easyurdu W/System.err: at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)

@SardarKhan299
Copy link
Author

SardarKhan299 commented Mar 23, 2020

@AoShenFengYu @willypwu @NlptechProduct @kote6363 any update on this issue? kindly fix this asap. thanks

@SardarKhan299
Copy link
Author

Hi, Can anyone tell me what the issue is and can you fix this issue? @AoShenFengYu @willypwu @kote6363 @NlptechProduct

@NlptechProduct
Copy link
Owner

Hi, you can add setRxJavaErrorHandler(); in the onCreate method of your Application class. Just like what we do in TestApplicaion.java in this project.

@SardarKhan299
Copy link
Author

Hi, @NlptechProduct thanks for the reply. I am really waiting for your reply. yes I have already added this code in my onCreate method.
private void setRxJavaErrorHandler() {
RxJavaPlugins.setErrorHandler(throwable -> {
if (throwable instanceof UnknownHostException) {
// ignore BleExceptions as they were surely delivered at least once
}
});
}
but still got the error.

@SardarKhan299
Copy link
Author

@NlptechProduct i think you don't add error handle method in rxjava.

@NlptechProduct
Copy link
Owner

@SardarKhan299 We have fixed it. Please upgrade to the latest version. Thanks.

@SardarKhan299
Copy link
Author

@NlptechProduct ok thanks i will check it.

@SardarKhan299
Copy link
Author

@NlptechProduct after upgrade to latest version some compilation error occurred . kindly check this.
AAPT: error: 'stickyOff' is incompatible with attribute backgroundType (attr) enum [empty=0, functional=2, normal=1, spacebar=6] [weak].

@SardarKhan299
Copy link
Author

@NlptechProduct check the path.
main\res\xml-sw600dp\key_styles_common.xml:59: AAPT: error: 'stickyOn' is incompatible with attribute backgroundType (attr) enum [empty=0, functional=2, normal=1, spacebar=6] [weak].

@SardarKhan299
Copy link
Author

@NlptechProduct also this
app\src\main\res\xml-sw600dp\key_styles_enter.xml:85: AAPT: error: 'action' is incompatible with attribute backgroundType (attr) enum [empty=0, functional=2, normal=1, spacebar=6] [weak].

@NlptechProduct
Copy link
Owner

@NlptechProduct after upgrade to latest version some compilation error occurred . kindly check this.
AAPT: error: 'stickyOff' is incompatible with attribute backgroundType (attr) enum [empty=0, functional=2, normal=1, spacebar=6] [weak].

@SardarKhan299 Is it happening on this demo project? I can build it successfully.

@SardarKhan299
Copy link
Author

@NlptechProduct yes. you can run the app and then check it,

@SardarKhan299
Copy link
Author

@NlptechProduct yes this project builds successfully but when trying to run it shows this error. kindly check it.

@NlptechProduct
Copy link
Owner

@SardarKhan299 I ran it on my device successfully. It didn't happen on my phone.

@SardarKhan299
Copy link
Author

@NlptechProduct i am using implementation 'com.nlptech.zengine:keyboardkernel:1.3.12'

@NlptechProduct
Copy link
Owner

@SardarKhan299 So do I. It works fine. Is it happening on this demo project or on your own project?

@SardarKhan299
Copy link
Author

@NlptechProduct it was my own project i am using your keyboard as library in my project's gradle file.

@NlptechProduct
Copy link
Owner

@SardarKhan299 Do you have this in your build.gradle file?
lintOptions {
abortOnError false
}

@SardarKhan299
Copy link
Author

Yes my gradle file is
lintOptions {
abortOnError false
}
sourceSets {
main {
assets.srcDirs = ['src/main/assets']
// jniLibs.srcDirs = ['src/main/jniLibs']
}
}
//For language test
dataBinding {
enabled = true
}

compileOptions {
    sourceCompatibility 1.8
    targetCompatibility 1.8
}

There Error occurred here.

<key-style
latin:styleName="shiftKeyStyle"
latin:keySpec="!icon/shift_key_shifted|!code/key_shift"
latin:backgroundType="stickyOff"
latin:parentStyle="baseForShiftKeyStyle" />

it says, This .

AAPT: error: 'stickyOff' is incompatible with attribute backgroundType (attr) enum [empty=0, functional=2, normal=1, spacebar=6] [weak].

@SardarKhan299
Copy link
Author

@NlptechProduct did you check this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants