@@ -170,23 +170,26 @@ private static void installNativeLibraryPath(ClassLoader classLoader, File folde
170
170
TinkerLog .e (TAG , "installNativeLibraryPath, folder %s is illegal" , folder );
171
171
return ;
172
172
}
173
+ // android o sdk_int 26
174
+ // for android o preview sdk_int 25
173
175
if ((Build .VERSION .SDK_INT == 25 && Build .VERSION .PREVIEW_SDK_INT != 0 )
174
- || Build .VERSION .SDK_INT > 25 ) {
176
+ || Build .VERSION .SDK_INT > 25 ) {
175
177
try {
176
178
V25 .install (classLoader , folder );
177
179
return ;
178
180
} catch (Throwable throwable ) {
179
- // install fail, try to treat it as v14
180
- TinkerLog .e (TAG , "installNativeLibraryPath, v25 fail, sdk: %d, error: %s" ,
181
+ // install fail, try to treat it as v23
182
+ // some preview N version may go here
183
+ TinkerLog .e (TAG , "installNativeLibraryPath, v25 fail, sdk: %d, error: %s, try to fallback to V23" ,
181
184
Build .VERSION .SDK_INT , throwable .getMessage ());
185
+ V23 .install (classLoader , folder );
182
186
}
183
- }
184
- if (Build .VERSION .SDK_INT >= 23 ) {
187
+ } else if (Build .VERSION .SDK_INT >= 23 ) {
185
188
try {
186
189
V23 .install (classLoader , folder );
187
190
} catch (Throwable throwable ) {
188
191
// install fail, try to treat it as v14
189
- TinkerLog .e (TAG , "installNativeLibraryPath, v23 fail, sdk: %d, error: %s" ,
192
+ TinkerLog .e (TAG , "installNativeLibraryPath, v23 fail, sdk: %d, error: %s, try to fallback to V14 " ,
190
193
Build .VERSION .SDK_INT , throwable .getMessage ());
191
194
192
195
V14 .install (classLoader , folder );
0 commit comments