I am using agora video call on my app and getting bellow errors on Android physical devices and emulators. There is no any problem on iOS yet. So I believe it's not about app_id is not correct.
here is error:
D/agora-jni( 4883): android bridge create done...
E/libc ( 4883): Access denied finding property "net.dns1"
E/libc ( 4883): Access denied finding property "net.dns2"
E/libc ( 4883): Access denied finding property "net.dns3"
E/libc ( 4883): Access denied finding property "net.dns4"
this is my app/build.gradle file:
...
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "..."
minSdkVersion 19
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
...
signingConfigs {
release {
...
}
}
buildTypes {
debug {
minifyEnabled false
shrinkResources false
}
release {
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation group: 'com.google.android.material', name: 'material', version: '1.4.0-alpha02'
implementation platform('com.google.firebase:firebase-bom:27.1.0')
implementation "androidx.multidex:multidex:2.0.0"
implementation 'androidx.browser:browser:1.3.0'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
I am using r8 shrink and proguard. My proguard-rules.pro file:
-keep class io.agora.**{*;}
And my gradle.properties file:
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
android.bundle.enableUncompressedNativeLibs=false
My pubspec.yaml file:
permission_handler: ^6.1.1
agora_rtc_engine: ^3.1.3
The message Access denied finding property "net.dns" shown on logs is just a warning as mentioned on this GitHub issue thread and shouldn't cause issues running the app. What you can do here is check if there's a different cause of the issue. See if you're able to get the user id if you're able to join a channel successfully.
Related
I am trying to add firestore to my note app to store my notes and when I run it this error comes:
Build file '~/StudioProjects/noteapp/android/app/build.gradle' line: 29
* What went wrong:
A problem occurred evaluating project ':app'.
> No signature of method: build_9oqkz1yq0b57t4arqvsiar91y.android() is applicable for argument types: (build_9oqkz1yq0b57t4arqvsiar91y$_run_closure2) values: [build_9oqkz1yq0b57t4arqvsiar91y$_run_closure2#2d8103c5]
This is my build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.example.noteapp"
minSdkVersion 16
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
multiDexEnabled true
signingConfig signingConfigs.debug
minifyEnabled false
useProGaurd false
shrinkResources false
}
}
}
dependencies {
implementation platform('com.google.firebase:firebase-bom:28.4.0')
implementation 'com.google.firebase:firebase-analytics'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
How do I solve this? Tell me if you need my main.dart as well.
EDIT: It got solved by this:
Gradle DSL method not found: 'runProguard'
I just had to remove this line from my build.gradle:
buildTypes {
release {
multiDexEnabled true
signingConfig signingConfigs.debug
minifyEnabled false
//useProGaurd false
shrinkResources false
}
}
Useprogaurd:false
I got the idea from this and from #gtxtreme:
Gradle DSL method not found: 'runProguard'
Having successfully converted one project to FCM, I'm running into problems converting my second. This project is unique as I prefer to keep it on targetSdkVersion 22.
This is my gradle file . . .
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:22'
defaultConfig {
applicationId "com.myname.myapp"
minSdkVersion 21
targetSdkVersion 22
}
buildTypes {
debug {
debuggable true
}
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
implementation project(':library')
implementation project(':googleplayservices_lib')
implementation files('libs/gson-2.2.2.jar')
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.android.support:support-v4:22.2.1'
}
apply plugin: 'com.google.gms.google-services'
When I try to run the project on an emulator I get . . .
Program type already present:
com.google.android.gms.common.data.Freezable
I have no idea what this is about and google turns up nothing useful. However it appears to be caused by the firebase-core dependency because it I remove that, the project runs fine.
What might be causing this?
I'm trying to get Mobile GTS' prebuilt Candy Jump app to run and build an APK in Android Studio. I've followed this video precisely: https://www.youtube.com/watch?v=YpYVdJVYWg0.
However, I am using Gradle 4.7, JDK 1.8.0, Android Plugin Version 3.1.2 and Build Tools Version 27.0.3. I'm not sure if that would have anything to do with why I can't get it to build, but I've had error after error and I've kind of boiled it down to what I hope is the last error.
Supplied String module notation 'libs/dagger-1.2.2.jar' is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'.
How can I fix this error?
Here's my build.gradle (module: app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "net.mobilegts.candyjump"
minSdkVersion 19
targetSdkVersion 27
multiDexEnabled true
ndk {
moduleName "player_shared"
}
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
sourceSets.main {
jni.srcDirs = []// <-- disable automatic ndk-build call
}
productFlavors {
}
}
dependencies {
implementation('com.google.android.gms:play-services:+') { exclude module: 'support-v4' }
implementation 'libs/dagger-1.2.2.jar'
implementation 'libs/javax.inject-1.jar'
implementation 'libs/nineoldandroids-2.4.0.jar'
implementation 'libs/support-v4-19.0.1.jar'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-core-utils:27.1.1'
}
You should use "implementation files" for jar files. Try the following code:
implementation files('libs/dagger-1.2.2.jar')
implementation files('libs/javax.inject-1.jar')
implementation files('libs/nineoldandroids-2.4.0.jar')
implementation files('libs/support-v4-19.0.1.jar')
I try to use last SonarQube plugin for Gradle on an Android project.
I follow this:
http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Gradle
My root.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
plugins {
id "org.sonarqube" version "2.0.1"
}
allprojects {
repositories {
jcenter()
}
}
My app.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.xxxxxx.xxxxxx"
minSdkVersion 15
targetSdkVersion 17
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
versionCode 232
versionName "2.3.2"
}
buildTypes {
debug {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
testOptions {
unitTests.returnDefaultValues = true
}
}
sonarqube {
properties {
property "sonar.projectName", "xxxxx"
property "sonar.projectKey", "org.sonarqube:com.xxxxxxx.xxxxxxxx"
property "sonar.sources", "src/main/java"
property "sonar.java.binaries","build/intermediates/classes"
property "sonar.tests", "src/test/java"
property "sonar.android.lint.report", "build/lint-results.xml"
property "sonar.junit.reportsPath", "build/test-results/debug/"
}
}
dependencies {
compile 'com.android.support:support-v4:23.4.0'
androidTestCompile 'junit:junit:4.12'
testCompile 'junit:junit:4.12'
}
I run
./gradlew sonarqube -Dsonar.verbose=true
Logs:
Incremental java compilation is an incubating feature.
:sonarqube
Bytecode of dependencies was not provided for analysis of source files, you might end up with less precise results. Bytecode can be provided using sonar.java.libraries property
sonar.binaries and sonar.libraries are deprecated since version 2.5 of sonar-java-plugin, please use sonar.java.binaries and sonar.java.libraries instead
Bytecode of dependencies was not provided for analysis of test files, you might end up with less precise results. Bytecode can be provided using sonar.java.test.libraries property
Class 'com/xxxxxx/xxxxxxx/ChangelogActivity' is not accessible through the ClassLoader.
Class 'com/xxxxxx/xxxxxxx/ChangelogActivity$1' is not accessible through the ClassLoader.
Class 'com/xxxxxx/xxxxxxx/ConfigActivity' is not accessible through the ClassLoader.
Class 'com/xxxxxx/xxxxxxx/ConfigActivity$1' is not accessible through the ClassLoader.
I obtain this error msg on all my classes.
Unfortunately due to complexity of Android Gradle projects (ability to have several flavors in a single project for example) we are not able to automatically collect all information we need to run a SonarQube analysis without any extra config.
Please follow: https://jira.sonarsource.com/browse/SONARGRADL-6
I'm trying to configure a android app to run tests with robolectric.
I'm new to gradle, and I can't find out what the problem is.
When I run ./gradlew robolectric on the command line, I get a cannot find symbol error.
The error I get is:
MainActivityTest.java:18: error: cannot find symbol
Robolectric.buildActivity(MainActivity.class).get().getResources();
^
symbol: class MainActivity
location: class MainActivityTest
This is my build.gradle file:
apply plugin: 'com.android.application'
apply plugin: 'robolectric'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.app.id"
minSdkVersion 16
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
sourceSets{
main.setRoot('src/main')
androidTest.setRoot('src/test')
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile 'org.robolectric:robolectric:2.3'
androidTestCompile 'junit:junit:4.11'
}
So, the problem seems to be that I cannot access the source file when I run the tests, but I couldn't find a way to fix it.
Can anyone tell me what i'm doing wrong?
Thanks!
main.setRoot('src/main') => Is it really a main folder / package in your project?
You can test again by using the fully file directory, ex: src/helloword/mainActivity.java