android so文件路径,android加载指定路径so库文件

public class MainActivity extends AppCompatActivity {

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

initNativeDirectory(getApplication());

System.load("/data/data/com.example.myapplication/files/libc++_shared.so");

System.load("/data/data/com.example.myapplication/files/libaaa.so");

}

public static void initNativeDirectory(Application application) {

if (hasDexClassLoader()) {

try {

Log.v("TAG", "create new native dir");

createNewNativeDir(application);

} catch (Exception e) {

e.printStackTrace();

}

}

}

private static void createNewNativeDir(Context context) throws Exception{

PathClassL

你可能感兴趣的:(android,so文件路径)