Skip to content
New issue

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

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

Already on GitHub? # to your account

NativeScript android build fail with api 28 AndroidX #1211

Closed
NickIliev opened this issue Nov 14, 2018 · 1 comment
Closed

NativeScript android build fail with api 28 AndroidX #1211

NickIliev opened this issue Nov 14, 2018 · 1 comment

Comments

@NickIliev
Copy link

@tvannguyen commented on Wed Nov 14 2018

When I build natviscript project with "implementation("androidx.appcompat:appcompat:1.0.2")", The project build fail with error below. Please help me, thanks...

/media/DATA/nativescript/test/TestBiometricLib/platforms/android/app/src/main/java/com/tns/FragmentClass.java:9: error: cannot find symbol
public class FragmentClass extends android.support.v4.app.Fragment implements com.tns.NativeScriptHashCodeProvider {
                                         ^
/media/DATA/nativescript/test/TestBiometricLib/platforms/android/app/src/debug/java/com/tns/ErrorReport.java:318: error: cannot find symbol
    private class Pager extends FragmentStatePagerAdapter {
                                ^
symbol:   class AppCompatActivity
  location: class ErrorReportActivity
/media/DATA/nativescript/test/TestBiometricLib/platforms/android/app/src/debug/java/com/tns/ErrorReportActivity.java:45: error: no suitable method found for makeText(ErrorReportActivity,String,int)
            Toast.makeText(this, "Couldn't resolve permissions", Toast.LENGTH_LONG).show();
                 ^
    method Toast.makeText(Context,CharSequence,int) is not applicable
      (argument mismatch; ErrorReportActivity cannot be converted to Context)
    method Toast.makeText(Context,int,int) is not applicable
      (argument mismatch; ErrorReportActivity cannot be converted to Context)

.........
@vtrifonov
Copy link
Contributor

vtrifonov commented Jan 17, 2019

Hi @tvannguyen, you cannot use both android support library and android X in one project, you can try this new functionality using out tns-anroid@next version.

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

No branches or pull requests

2 participants