Skip to content

Migrating to AndroidX #560

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

Closed
codeanticode opened this issue Oct 16, 2019 · 12 comments
Closed

Migrating to AndroidX #560

codeanticode opened this issue Oct 16, 2019 · 12 comments

Comments

@codeanticode
Copy link
Contributor

All support packages have been renamed in Android X (API level 29), for example, android.support.v7.app.AppCompatActivity is now androidx.appcompat.app.AppCompatActivity. Older versions of the package will no longer be updated, so version 5.0 of the mode is probably good point to make the switch. Some useful info:

https://developer.android.com/jetpack/androidx/migrate
https://blog.danlew.net/2018/11/14/the-reality-of-migrating-to-androidx/

@hmy65
Copy link

hmy65 commented Oct 19, 2019

I migrated version 275 to AndroidX, for anyone who still waiting for the official migration, you can use https://drive.google.com/open?id=1TJI89yqmjklIfMvO9KpeSINYYcw66eTr

This is only the core jar library(aka. not include AR & VR).

I personally haven't found any bugs yet, your situation might vary.

Also, here is the link how to use as a library in Android studio.
https://android.processing.org/tutorials/android_studio/index.html

@codeanticode
Copy link
Contributor Author

@hmy65 thanks for creating the AndroidX port. Great to know that it works!

If you can create a PR of your changes against this repo, then I'll be happy to review and merge into master.

@hmy65
Copy link

hmy65 commented Oct 20, 2019

@codeanticode
I created a separate library project to port the core library, so I could not create a pull request sorry.
The AndroidX core library source code is here.
https://drive.google.com/open?id=1wX6OLitBD_53_QANB_4xPvKXZ4RJH3qu

@codeanticode
Copy link
Contributor Author

@hmy65 this is very helpful, thank you!

@astetyn
Copy link

astetyn commented Dec 17, 2019

@hmy65
Hello,
I started doing new AndroidStudio project and find that I cant use the old processing-core for the project because I need to use new FragmentActivity from androidx.

I need exactly what you have done but in AndroidStudio I need compiled files to import. How can I compile your modified source code? Or can you post them if you have them?

(I am a newbie in AndroidStudio and dont know how exactly it works. Sorry if my question doesnt make sense.)

Thanks.

@Nadeembhat
Copy link

I was using Api level 28 but after migrated my whole project to androidx i am getting issue while i install my app , gradle is build successfully but app is not installing showing me an error
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.packagename/com.app.packagename.view.MainActivityView}: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2345) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2407) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5280) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758) Caused by: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat. at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:756) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:196) at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:86) at android.support.v7.app.AppCompatDelegateImpl.<init>(AppCompatDelegateImpl.java:260) at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:182) at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:520) at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71) at in.stc.ievince.view.MainActivityView.onCreate(MainActivityView.java:264) at android.app.Activity.performCreate(Activity.java:6222) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295)

@pineapplegreentea
Copy link
Contributor

pineapplegreentea commented Apr 30, 2020

Here is a jar working for API level 30 R preview which seems to have a new runtime verifier. I have only tested core.
https://drive.google.com/file/d/1lfQruM5NCkxegp_iGVIXeU6xfvTSnmfa/view?usp=sharing

The source is available at https://github.com/pineapplegreentea/processing-android

@ranaaditya
Copy link
Member

ranaaditya commented Jun 11, 2020

@pineapplegreentea your work is appriciable but we cannot migrate the whole project to AndroidX in this way, you have only migrated the java codebase which is responsible for rendering and permission stuff and all, but the app which will be installed in the device/emulator after using the android-mode in PDE will be still using the support libraries !!

@pineapplegreentea
Copy link
Contributor

pineapplegreentea commented Jun 15, 2020

@ranaaditya I understand your concerns, however, the support libraries have been deprecated since API 28, two years ago now. Even if not fully backward compatible, it would be nice to have an avenue (maybe a branch) for prototyping on recent devices.

@victordiaz
Copy link

any progress on this? how can I help?

@codeanticode
Copy link
Contributor Author

Working on the migration to AndroidX on this branch.

@codeanticode
Copy link
Contributor Author

The migration to AndroidX is complete with this PR fae1f8c, will release a new version of the mode shortly!

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

No branches or pull requests

7 participants