p4ulor / NutritionTrackerApp

Nutrition tracker android app for macros and micros (under development)
0 stars 0 forks source link

Project failing with error #1

Open dshetyo opened 2 years ago

dshetyo commented 2 years ago

I am trying to run this project as am interested in using HtmUnit lib which u used.

When i start the app. After clicking the button am getting following error. I did receive same error when i was trying to use net.sourceforge.htmlunit:htmlunit:2.58.0.

Are u successful in using html unit lib on android?

2022-02-17 21:10:28.763 8515-8515/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: paulor.nutritiontrackerkotlin, PID: 8515
    java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar!classes4.dex)
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:151)
        at com.gargoylesoftware.htmlunit.httpclient.HtmlUnitSSLConnectionSocketFactory.buildSSLSocketFactory(HtmlUnitSSLConnectionSocketFactory.java:89)
        at com.gargoylesoftware.htmlunit.HttpWebConnection.configureHttpsScheme(HttpWebConnection.java:670)
        at com.gargoylesoftware.htmlunit.HttpWebConnection.createHttpClientBuilder(HttpWebConnection.java:588)
        at com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClientBuilder(HttpWebConnection.java:544)
        at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:173)
        at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1597)
        at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1519)
        at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:498)
        at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:413)
        at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:551)
        at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:533)
        at paulor.nutritiontrackerkotlin.MainActivityViewModel.getFood(MainActivity.kt:97)
        at paulor.nutritiontrackerkotlin.fragments.HomeFragment.onCreateView$lambda-0(HomeFragment.kt:26)
        at paulor.nutritiontrackerkotlin.fragments.HomeFragment.$r8$lambda$oLhVoC0TON1oPmPiWZ-31sqsrqE(Unknown Source:0)
        at paulor.nutritiontrackerkotlin.fragments.HomeFragment$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
        at android.view.View.performClick(View.java:7448)
        at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1131)
        at android.view.View.performClickInternal(View.java:7425)
        at android.view.View.access$3600(View.java:810)
        at android.view.View$PerformClick.run(View.java:28305)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
p4ulor commented 2 years ago

@dshetyo Hi, sorry I didn't see this. See this issue and the other issues that reference this issue https://github.com/skrapeit/skrape.it/issues/180 I also tried to run the other day and it didnt work, the snapshot might be gone or something. I will only comeback to this issue and add this feature in the future Ups, I just realized you were already aware of it by participating in the issue lol