标签: targetsdkversion

React-native 应用程序在真正的 Android 设备上崩溃

我正在使用 react-native,目前开始使用 redux 并创建了一个应用程序,但是当我在模拟器上运行该应用程序时,它运行良好。然后我通过 USB 将我的手机与 android 6 连接,它也在工作。但是在 Android 8 的其他设备中它不起作用然后我将 targetSdkVersion 更改为 28 然后它也不起作用我不明白是什么问题。

以下是我的 package.json

{
  "name": "Demo",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.6.3",
    "react-native": "^0.57.8",
    "react-native-flash-message": "^0.1.10",
    "react-native-linear-gradient": "^2.5.3",
    "react-native-modal-datetime-picker": "^6.0.0",
    "react-native-navigation": "^2.8.0",
    "react-native-tab-view": "^1.3.2",
    "react-native-vector-icons": "^6.2.0",
    "react-redux": "^6.0.1",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "babel-core": "^7.0.0-bridge.0",
    "babel-jest": "24.0.0",
    "jest": "24.0.0",
    "metro-react-native-babel-preset": "0.51.1",
    "react-test-renderer": "16.6.3"
  },
  "jest": {
    "preset": "react-native"
  }
}
Run Code Online (Sandbox Code Playgroud)

android/build.gradle

buildscript …
Run Code Online (Sandbox Code Playgroud)

android react-native react-native-navigation targetsdkversion

4
推荐指数
1
解决办法
5516
查看次数

如果我设置了 targetSdkVersion 28,AdvancedWebView (delight-im/Android-AdvancedWebView) 将停止显示网页

我正在使用这个 WebView 扩展:

https://github.com/delight-im/Android-AdvancedWebView

Google Play 管理中心正在targetSdkVersion 28为未来的出版物申请一个。我尝试更新我的项目,但组件停止显示网页。如果我设置targetSdkVersion 26 一切正常

任何人都可能与其他 WebView 扩展处于相同的情况?

webview android-custom-view targetsdkversion android-9.0-pie

4
推荐指数
1
解决办法
117
查看次数

Android Q模拟器-Build.VERSION.SDK_INT返回28

 Build.VERSION.SDK_INT 
Run Code Online (Sandbox Code Playgroud)

在Android Q模拟器上运行时,返回28而不是29。我有什么想念的吗?我正在尝试添加专门针对Android Q的逻辑,但我不知道如何正确确定此版本。

app.gradle文件包含

    targetSdkVersion = 'Q'
    compileSdkVersion = 'android-Q'
Run Code Online (Sandbox Code Playgroud)

sdk android target-sdk targetsdkversion android-10.0

3
推荐指数
2
解决办法
921
查看次数

任务':app:checkDebugAarMetadata设置targetSdkVersion 30和compileSdkVersion 30执行失败

我已经设置targetSdkVersion 31compileSdkVersion 31然后代码工作正常,但设置30然后显示此错误。相同的依赖关系并且targetSdkVersion 30compileSdkVersion 31其他项目中正常工作。

应用程序 > 构建.gradle

    compileSdkVersion 30
    minSdkVersion 21
    targetSdkVersion 30
Run Code Online (Sandbox Code Playgroud)
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.5.0-alpha02'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test:runner:1.4.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation 'com.google.code.gson:gson:2.8.8'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation 'io.github.inflationx:calligraphy3:3.1.1'
    implementation 'io.github.inflationx:viewpump:2.0.3'
    implementation 'com.google.android.gms:play-services-ads:20.4.0'
    implementation 'com.google.android.gms:play-services-auth:19.2.0'
    implementation 'com.google.android.ads.consent:consent-library:1.0.8'
    implementation 'com.onesignal:OneSignal:4.6.0@aar'
    implementation 'com.google.firebase:firebase-analytics:19.0.2'
    implementation 'com.google.firebase:firebase-messaging:22.0.0'
    implementation 'org.greenrobot:eventbus:3.1.1'
    implementation 'com.hootsuite.android:nachos:1.2.0'
    implementation 'io.github.lizhangqu:coreprogress:1.0.2'
    implementation …
Run Code Online (Sandbox Code Playgroud)

android gradle android-studio targetsdkversion

2
推荐指数
1
解决办法
5734
查看次数