Skip to content
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

Multiple Issues with Android Studio #17

Open
pmcg86 opened this issue Nov 26, 2018 · 2 comments
Open

Multiple Issues with Android Studio #17

pmcg86 opened this issue Nov 26, 2018 · 2 comments

Comments

@pmcg86
Copy link

pmcg86 commented Nov 26, 2018

No description provided.

@pmcg86
Copy link
Author

pmcg86 commented Nov 26, 2018

Using Android Studio 3.2.1

When importing the project i'm getting "No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android"

When that is fixed it gives you a "Could not find com.android.tools.lint:lint-gradle:26.1.2." issue.

After fixing these i run into Render Problems:
Couldn't resolve resource @string/path_password_strike_through - This seems to be an issue with every input box. The issue is to do with android.support.design.widget.TextInputLayout. I have to apply the below lines of code to each the XMLs and each label
xmlns:tools="http://schemas.android.com/tools

app:passwordToggleDrawable="@string/path_password_strike_through
app:hintTextAppearance="@style/TextAppearance.App.TextInputLayout.

Furthermore, the main issue that won't allow the project to be build is "failed to instantiate one or more classes"

The following classes could not be instantiated:
- android.support.design.widget.TextInputLayout (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE. If this is an unexpected error you can also try to build the project, then manually refresh the layout. Exception Details java.lang.NullPointerException   at android.content.res.Resources_Delegate.getDrawable(Resources_Delegate.java:189)   at android.content.res.Resources.getDrawable(Resources.java:827)   at android.content.Context.getDrawable(Context.java:626)   at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:358)   at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:198)   at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:186)   at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)   at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:75)   at android.support.design.widget.TextInputLayout.(TextInputLayout.java:241)   at android.support.design.widget.TextInputLayout.(TextInputLayout.java:187)   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:863)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:837)   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:866)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:837)   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)   at android.view.LayoutInflater.inflate(LayoutInflater.java:515)   at android.view.LayoutInflater.inflate(LayoutInflater.java:394)

Any solutions to get around these issues? When importing I've not updated anything that Android Studio has asked me to, except for updated the gradle wrapper to 4.4 and the gradle build to 3.1.3 to get it synced.

If you need any other details i can provide them as i would love to use this design in my Uni project

@ChampionTej05
Copy link

Hey, I have found solution to this Issue, I have also undergone through the same. Problem is relatively different gradle, and Butterknife Library. I have just downloaded the Gradle as it was mentioned and changed few code related to Butterknife Library. Here are the fixes:

  1. Remove the Dependency in app module Gradle File.
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
  1. Remove the Same from build.gradle file of Project
    classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'

  2. Remove the Import Statements from Login Activity and Sign Up activity related to Butterknife.
    Where ever "@BindView" is used just remove that and go with normal declaration of UI widgets,
    like we do
    ex:

**Declaration outside the activity**
   @BindView(R.id.input_email) EditText _emailText;
 @BindView(R.id.input_password)  EditText _passwordText;
    @BindView(R.id.btn_login) Button _loginButton;
    @BindView(R.id.link_signup ) TextView _signupLink;

** Statement Inside the Activity**
`ButterKnife.bind(this);`

to

**Declaration outside the activity**
    EditText _emailText;
    EditText _passwordText;
    Button _loginButton;
    TextView _signupLink;

  ** Statement Inside the Activity**
        _emailText=findViewById(R.id.input_email);
        _passwordText=findViewById(R.id.input_password);
        _loginButton=findViewById(R.id.btn_login);
        _signupLink=findViewById(R.id.link_signup);
  1. Do this same thing for the Signup Activity also.
    I Hope that this would help you. If you need the updated gradle file, then I will share the same.

image
image

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

No branches or pull requests

2 participants