Thursday, January 28, 2016

Android Internal API with Android Studio

Hi everyone!

I'm looking for help how to get Android Studio working with Androids Internal API.

There is a very good tutorial HERE that shows how to set everything up in Eclipse,
but since Eclipse is now deprecated and Google will be dropping support for ADT plugin
the logical move is to set everything up with Android Studio.

The things I did are pulling the boot.oat file from stock Nexus 5X, and use the standard procedure to get framework.jar and framework-classes2.jar.
After getting the internal packages out of the framework, I modified the android.jar file by adding all the missing packages.

The problem is even though all references, classes, interfaces and resources are there and the code doesn't give errors or warnings
that classes could not be found, the build still fails with messages like these:

Code:

error: package com.android.internal.R does not exist
            com.android.internal.R.drawable.sym_app_on_sd_unavailable_icon);
...
cannot find symbol
        mLocales = LocalePicker.constructAdapter(this);
...

Basicly, anything related to the internal API gives an error only when compiling.

My next idea is to build all the internal classes as a library and add it to the project where I need it,
but I wanted to ask does anyone else have any better ideas or suggestions?
I've done my googling but I haven't found anything recent and related to AS, only Eclipse.


via xda-developers http://ift.tt/1Tpjpqp

IFTTT

Put the internet to work for you.

Turn off or edit this Recipe

No comments:

Post a Comment