Skip to content

Commit cd323e6

Browse files
authored
Fix Android API 31 issues and Convert example to TS (#812)
* convert example to TS * fix android api 31 issues
1 parent 26ff2f4 commit cd323e6

File tree

10 files changed

+245
-246
lines changed

10 files changed

+245
-246
lines changed

example/android/build.gradle

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22

33
buildscript {
44
ext{
5-
androidGradlePluginVersion = '4.0.0'
6-
androidSdkVersion = 30
5+
androidSdkVersion = 31
76
androidMinSdkVersion = 21
87
kotlinVersion = "1.3.61"
98
kotlinStdlib = "kotlin-stdlib-jdk8"
109
detoxKotlinVersion = kotlinVersion
11-
googleServices = "4.3.3"
1210
}
1311
repositories {
1412
google()
1513
mavenCentral()
1614
}
1715
dependencies {
18-
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion"
19-
classpath "com.google.gms:google-services:$googleServices"
16+
classpath "com.android.tools.build:gradle:4.0.2"
17+
classpath "com.google.gms:google-services:4.3.3"
2018
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
2119
}
2220
}

example/android/myapplication/build.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,3 @@ dependencies {
6060
}
6161

6262
apply plugin: 'com.google.gms.google-services'
63-
64-
apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
65-
applyNativeModulesAppBuildGradle(project, "../../../")

example/android/myapplication/src/main/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
<activity
1717
android:name=".MainActivity"
18-
android:label="@string/app_name">
18+
android:label="@string/app_name"
19+
android:exported="true">
1920
<intent-filter>
2021
<action android:name="android.intent.action.MAIN"/>
2122

example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/MainActivity.java

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package com.wix.reactnativenotifications.app;
22

3-
import android.os.Bundle;
43
import com.facebook.react.ReactActivity;
54

6-
75
public class MainActivity extends ReactActivity {
86
@Override
97
protected String getMainComponentName() {

example/index.js

-217
This file was deleted.

0 commit comments

Comments
 (0)