alibaba / alibaba/freeline

com.antfortune.freeline.FreelineApplication cannot be cast to 我自己的Application

Open
#892 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.4k
Forks
620
PR merge metrics
No merged PRs in 30d

Description

Caused by: java.lang.ClassCastException: com.antfortune.freeline.FreelineApplication cannot be cast to com.sczhuoshi.appzzb.AppContext
at com.sczhuoshi.netwok.HTTPRequest.doRequest(HTTPRequest.java:261)
at com.sczhuoshi.netwok.MyAsyncTask.doInBackground(MyAsyncTask.java:113)
at com.sczhuoshi.netwok.MyAsyncTask.doInBackground(MyAsyncTask.java:26)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
at java.lang.Thread.run(Thread.java:818) 

用了这个后确实爽,但是apk用applicationcontext变成了FreelineApplication...没有变成我自己的MyApplication。有没有大牛遇到过的。。。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the application-context cast at HTTPRequest.java:261 and the request flow through MyAsyncTask.java:113. Check how FreelineApplication is configured in the Android application setup; done means the request path no longer throws ClassCastException when Freeline is enabled and the app's expected context is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
build-system, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.