8
votes

I am REALLY new to Android Studio and I was moving to fast and removed something from my code...now I keep getting an error message & my gradle sync fails.

I see the following in the log:

2016-06-01 05:39:55,358 [32778590]   WARN - radle.project.ProjectSetUpTask -  
2016-06-01 05:39:55,358 [32778590]   INFO - radle.project.ProjectSetUpTask - No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

Consult IDE log for more details (Help | Show Log) 
2016-06-01 05:39:55,360 [32778592]   INFO - ls.idea.gradle.GradleSyncState - Sync with Gradle for project 'Jumping-Jinn' failed: No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

Consult IDE log for more details (Help | Show Log) 
2016-06-01 05:39:56,676 [32779908]   INFO -       #com.jetbrains.cidr.lang - Clearing symbols finished in 0 s. 
2016-06-01 05:39:56,677 [32779909]   INFO -       #com.jetbrains.cidr.lang - Loading symbols finished in 0 s. 
2016-06-01 05:39:56,678 [32779910]   INFO -       #com.jetbrains.cidr.lang - Building symbols finished in 0 s. 
2016-06-01 05:39:56,678 [32779910]   INFO -       #com.jetbrains.cidr.lang - Saving symbols finished in 0 s. 

My code basically says nothing: NOTE: AppCompatActivity is in red currently

import android.media.Image;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageButton;
import android.widget.Toast;

public class HomeScreen extends AppCompatActivity {

    ImageButton musicEnable_ImageButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home_screen);

        musicEnable_ImageButton = (ImageButton) findViewById(R.id.soundEnable_button);
        musicEnable_ImageButton.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                musicEnable_ImageButton.setBackgroundResource(R.drawable.musicon1);
            }
        });
    }
4
I've just started to get this error, out of the blue. I don't think it has anything to do with the code you've posted, given that mine is of course different. Did you manage to solve this? I'm searching for a solution now.brandall
@brandall after searching a while I finally found a solution: Go to Tools>Android>SDK Manager then, on the SDK Tools view, uncheck Android NDK & click Apply (confirm the selection). This will uninstall your NDK, then simply check it and hit apply & it will reinstall (it takes forever). When it finally finishes try to build & run your app again and it should work.1QuickQuestion
Try the following method: stackoverflow.com/a/54019946/7831470Sagar Giri

4 Answers

2
votes

The solution for me was the following:

  1. Open project in Android Studio
  2. Wait for sync to finish
  3. Click on File -> Project structure -> SDK Location
  4. At Android NDK Location, if you don't have any NDK, install one
  5. Select an existing NDK location.

That should fix it.

2
votes

Just add this line to your local.properties in android folder: ndk.dir=/Users/apatrck03/Library/Android/sdk/ndk/23.0.7123448

whatever your ndk version is (-:

0
votes

Installing an older NDK version (20.. or lower) from android studio seems to solve the problem. Higher versions don't solve the issue.

0
votes

Go to your Android Folder and add your ndk like this ->

ndk.dir={Android Folder location}/Sdk/ndk/{Your ndk version}

last view like this->

ndk.dir=/home/picoder/Android/Sdk/ndk/21.3.6528147

To check NDK version

enter image description here