Inclusion Criteria:  Male or female subjects aged ≥18 years old; Phase I dose escalation period: Histologically or cytologically confirmed diagnosis of locally advanced, or metastatic solid tumor, assessed by investigator that no standard therapy exists, or the tumor has relapsed, progressed or was nonresponsive to available therapies, or intolerance, or not suitable to standard therapy at current stage. Priority will be given to patients who have previously documented NTRK or ROS1 gene fusion confirmed by the central laboratory; Phase I dose expansion and Phase II: Histologically or cytologically confirmed diagnosis of locally advanced, or metastatic solid tumor, patients can provide a written report of pathological diagnosis of NTRK or ROS1 positive tested by qualified laboratory; Phase I dose expansion cohort 1 and Phase II cohort 1: locally advanced, or metastatic solid tumor with NTRK gene fusion Phase I dose expansion cohort 2 and Phase II cohort 2： locally advanced, or metastatic NSCLC with ROS1 gene fusion that has progressed to crizotinib and other therapies or was intolerance to crizotinib Phase I dose expansion cohort 3: locally advanced, or metastatic NSCLC with ROS1 gene fusion who have not previously received crizotinib or other therapy. phase I dose escalation: at least 1 measurable target lesion according to RECIST version 1.1 Phase I dose expansion and Phase II: at least 1 measurable target lesion according to RECIST version 1.1 (Tumor lesions treated with prior radiation or other local treatment are considered measurable if they show definite progression) ECOG PS 0-1 Life expectancy ≥ 3 months.  Adequate organ function:  Baseline laboratory values fulfilling the following requirements: Absolute neutrophils count (ANC) ≥1.5 × 109/L; Platelets (PLTs) ≥75 × 109/L; Hemoglobin ≥ 85g/L; Serum creatinine≤ 1.5 × ULN， or creatinine clearance ≥50 mL/min/1.73m2(only when serum creatinine>1.5 × ULN); Total serum bilirubin ≤1.5 × ULN; Liver transaminases (AST/ALT) ≤ 2.5 × ULN，≤3× ULN if liver metastases are present or liver cancer patients; Activated Partial Thromboplastin Time≤1.5× ULN；International Normalized Ratio (INR)≤1.5× ULN；  Eligible patients (male and female) who are fertile must agree to at least use a reliable contraceptive method with partner during the trial and within 90 days from the last dose; Women of childbearing age must have a negative serum pregnancy test within 7 days before the first dose of the trial.  Exclusion Criteria:  Received anti-tumor therapy such as chemotherapy, radiotherapy, biotherapy, endocrine therapy, immunotherapy or other therapy within 4 weeks prior to the first dose of the investigational drug except the following:  Nitroso ureas or mitomycin C within 6 weeks before the first dose of the drug; Oral fluorouracil and small molecule targeted drugs within 2 weeks prior to the first dose of drug or within 5 half life (whichever is longer);  Received other unmarketed investigational drugs or treatments within 4 weeks prior to the first dose of the investigational drug; Major organ surgery (except biopsy) or significant trauma within 4 weeks prior to first dose of the investigational drug or required elective surgery during the trial; Adverse reactions to previous antitumor therapy have not recovered to NCI CTCAE 5.0 ≤ grade 1 (except for alopecia, grade 2 peripheral neurotoxicity, stable hypothyroidism after hormone replacement therapy, etc.); Inability to swallow drug, or a condition that the investigator judged to severely affect gastrointestinal absorption (eg:Chronic Diarrhea, intestinal obstruction, etc.); Cerebral or meningeal metastases with clinical symptoms. The below patients were allowed to be included: those who were asymptomatic, stable, and did not require steroid treatment for more than 4 weeks prior to the start of study treatment (if the cerebral metastases had undergone radiotherapy or/and surgery, radiotherapy and surgery should be at least 1 month prior to the first dose) ; Known active infections and currently need intravenous anti-infective therapy; History of immune deficiencies, including positive HIV antibody tests; Active Hepatitis B (HBsAg and/or HBcAb positive with HBV-DNA > 500IU/ml) or hepatitis c virus infection (positive test results of anti-HCV with positive HCV-RNA ); Known interstitial lung disease (except for radioactive pulmonary fibrosis that does not require steroid therapy); History of serious cardiovascular disease; Pregnant or lactating women.