shared library problems with eclipse on Ubuntu

2019-05-24 23:17发布

I am using ubuntu 14.04 LTS 64 bits. and i installed eclipse Mars. and created "hello world" App. but the R class is always missing and never generated.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);//R cannot be resolved to a variable
}

and i did the folowing:

-clean project.

-delete the files in gen folder to be regenerated automatically

-checked the XML files in your resource folders and all has no errors

-right-click on the project->properties->Android to check that i am using the correct API

but the above mentioned steps did not solve the problem.

and the console output shows the following:

00] /home/guanr/Downloads/android-sdk-linux/build-tools/23.0.1/aapt: error     while loading shared libraries: libgcc_s.so.1: cannot open shared     object file: No such file or directory

Test_01] /home/guanr/Downloads/android-sdk-linux/build-tools/23.0.1/aapt: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory

please let me know how to solve it

1条回答
不美不萌又怎样
2楼-- · 2019-05-24 23:41

Looks like you need to install gcc library:

sudo apt-get install gcc-multilib
查看更多
登录 后发表回答