I Use External Dependency Manager for Unity in my project. And I added my project dependencies in a .xml file instead of using Gradle. But now I got some error about MultiDex. Can I enable MultiDex in my project without using Gradle files?
D8: Cannot fit requested classes in a single dex file (# methods: 75121 > 65536)
You can set minimum android API level to 21(Android 5.0 - Lollipop) and multidex will automatically be enabled. You can set it at player setting -> other settings.
Related
I want to get SHA1 with this comment gradlew signingReport in my android folder. But I can't.
my gradle version is 4.0.2.
I tried to delete the android.enableR8=true from the gradle.propertie file, But nothing changed!
Result of gradlew signingReport --scan
> Configure project :app
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
> Configure project :file_picker
WARNING: The option setting 'android.enableR8=true' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
FAILURE: Build failed with an exception.
* What went wrong:
Task 'singingReport' not found in root project 'android'. Some candidates are: 'signingReport'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 55s
Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? [yes, no] y
Please enter 'yes' or 'no': yes
Gradle Terms of Service accepted.
Publishing build scan...
Result of gradlew singingReport --scan:
Initialized native services in: C:\Users\Ali Azad\.gradle\native
The client will now receive all logging from the daemon (pid: 6348). The daemon log file: C:\Users\Ali Azad\.gradle\daemon\6.1.1\daemon-6348.out.log
Starting 7th build in daemon [uptime: 1 hrs 22 mins 57.548 secs, performance: 99%, GC rate: 0.00/s, heap usage: 9% of 1.1 GB]
Using 2 worker leases.
Starting Build
Settings evaluated using settings file 'D:\projects\Flutter Projects\mobile-app\android\settings.gradle'.
Projects loaded. Root project using build file 'D:\projects\Flutter Projects\mobile-app\android\build.gradle'.
Included projects: [root project 'android', project ':app', project ':file_picker', project ':firebase_auth', project ':firebase_core', project ':flutter_plugin_android_lifecycle', project ':flutter_splash_screen', project ':google_maps_flutter', project ':google_sign_in', project ':image_cropper', project ':image_picker', project ':location', project ':shared_preferences', project ':webview_flutter']
> Configure project :
Evaluating root project 'android' using build file 'D:\projects\Flutter Projects\mobile-app\android\build.gradle'.
> Configure project :app
Evaluating project ':app' using build file 'D:\projects\Flutter Projects\mobile-app\android\app\build.gradle'.
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Creating configuration androidTestUtil
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
Configuring Java sources compilation with source level 1.8 and target level 1.8.
> Configure project :file_picker
Evaluating project ':file_picker' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\file_picker-2.0.13\android\build.gradle'.
WARNING: The option setting 'android.enableR8=true' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Creating configuration androidTestUtil
> Configure project :firebase_auth
Evaluating project ':firebase_auth' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.18.3\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :firebase_core
Evaluating project ':firebase_core' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.5.2\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :flutter_plugin_android_lifecycle
Evaluating project ':flutter_plugin_android_lifecycle' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-1.0.11\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :flutter_splash_screen
Evaluating project ':flutter_splash_screen' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\flutter_splash_screen-0.1.0\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :google_maps_flutter
Evaluating project ':google_maps_flutter' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-1.0.6\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :google_sign_in
Evaluating project ':google_sign_in' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.6\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :image_cropper
Evaluating project ':image_cropper' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\image_cropper-1.3.1\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :image_picker
Evaluating project ':image_picker' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\image_picker-0.6.7+14\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :location
Evaluating project ':location' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\location-2.5.4\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :shared_preferences
Evaluating project ':shared_preferences' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\shared_preferences-0.5.12+4\android\build.gradle'.
Creating configuration androidTestUtil
> Configure project :webview_flutter
Evaluating project ':webview_flutter' using build file 'D:\Learning\flutter\flutter_sdk\.pub-cache\hosted\pub.dartlang.org\webview_flutter-1.0.7\android\build.gradle'.
Creating configuration androidTestUtil
All projects evaluated.
Analytics other plugin to proto: Unknown plugin type FlutterPlugin expected enum FLUTTERPLUGIN
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
Configuring Java sources compilation with source level 1.7 and target level 1.7.
FAILURE: Build failed with an exception.
* What went wrong:
Task 'singingReport' not found in root project 'android'. Some candidates are: 'signingReport'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 10s
You have a typo in your command. It should be gradlew signingReport not gradlew singingReport.
Mapbox SDK: 6.7.0
After enabling the proguard in the gradle, we are getting the following error.
com.mapbox.services.android.location.LostLocationEngine: can't find superclass or interface com.mapbox.services.android.telemetry.location.LocationEngine
com.mapbox.services.android.location.MockLocationEngine: can't find referenced class com.mapbox.services.android.telemetry.location.LocationEngine$Type
I have used LocationComponent, LocationEngine and LocationEngineProvider classes in my application. Do I need to add anything in proguard rules to generate a build with proguard enabled?
On commenting usages of these class, the build can be generated with proguard enabled.
Try adding the below lines in proguard file
-dontwarn com.mapbox.services.android.location.LostLocationEngine
-dontwarn com.mapbox.services.android.location.MockLocationEngine
I had a project that was working fine until I imported the BaseGameUtils library project for use with my project.
Is it possible to continue to use Gradle to build my project? I tried the Google Play Game Services in LibGDX instructions. Even though they are for IntelliJ - I would think the instructions would work for Eclipse but they don't.
The error I get is
A problem occurred configuring project ':android'.
Configuration with name 'default' not found.
This is from adding the line compile project(":BaseGameUtils") in my :android dependencies in build.gradle.
You don't need add this project to Gradle. Just import BaseGameUtils to Eclipse, then set it as a library
Right button on BaseGameUtils > properties > Android > check "Is a library" > click ok
Then go to your Android project (not the core project)
Properties > Android > Add library > select BaseGameUtils
Try to follow LibGDX Google Play Game Services Tutorial.
I have an Android library project in Eclipse that I am trying to build with Android Studio so I can generate an .aar file for my users.
The project seems to have been imported cleanly into Android Studio using the "Import Project" option in the welcome screen.
How do I now build the module? The instructions on the dev site say that I need to change:
apply plugin: 'android'
to
apply plugin: 'android-studio'
However my build.gradle file doesn't have that line (I would have assumed that the importer would have added it(?)).
If I insert the line apply plugin: 'android-library', and try to 'Sync Project with Gradle Files', I get the error:
Gradle 'MyProject' project refresh failed
Error:C:\Users\Fred\AndroidStudioProjects\MyProject\src\main\AndroidManifest.xml
(The system cannot find the path specified)
The same happens if I try to make the project anyway.
Here's what my build.gradle looks like:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
apply plugin: 'android-library'
My searches to find a solution have failed. Anyone know what is going on?
I'm using the latest Android Studio (0.5.8)
Don't put the apply plugin: 'android-library' statement in the top-level build file. You should find an apply plugin statement in your module-level build file, and you can modify it there as necessary.
Okay. After some head scratching and more searching, I resolved all my problems I think. For the record:
I think my first import broke somehow. Partly because of the problem highlighted by Scott Barta and possibly because my project directory had spaces in it? Not totally sure.
A later import went more smoothly and I was able to sync and build without errors. However, apart from the build output in the Gradle Console, there was no evidence anything had actually happned. The artifact (ie. the .aar file) doesn't show up in the UI.
After finding this question: How to export library to Jar in Android Studio? I realised that the aar file is in fact built. It is just hidden from you. You have to root around in the file system to find the .aar. It is in:
<Library module>/build/libs/
Something that the docs don't tell you anywhere. Sigh.
Hope this helps someone else..
I am trying use androidVNC open source project as a Library Project in my MainProject. androidVNC has also used ZoomerWithKeys library project. I want start a activity of androidVNC library project in my MainProject by clicking on a Button.
I have done all the basic things like to define all the activity of library project in Manifest of main Project.
The problem is that i am getting following error when trying to running my MainProject -
Dex Loader] Unable to execute dex: Multiple dex files define Lcom/antlersoft/android/zoomer/R$drawable;
[2013-05-16 15:44:03 - OtherProj] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/antlersoft/android/zoomer/R$drawable;
Thanks in advance.
I resolve this by doing following steps:
Go to bin folder of you app and see which libraries are duplicated(in mine I had 2 supportv4****)
Hold your mouse on them and see where they compile from, keep in mind that you should keep the most important one, so if you are using appcompat and facebookSDK, you should keep that library which comes from appcompat
Go to the properties of the project of the other library (e.g facebookSDK) -> Java build path -> Libraries and delete the dependency in which the buggy lib come from(in mine, supportV4 nested in Android Private Libraries, so I delete it),
Also do it from a file manager, go to our project folder/libs and delete that buggy library if it's not cleaned by default
In that window, after deleting, choose Add Jars... and select the library of the other project(in mine, I choose SupportV4 from appcompat)
Clean you workspace, restart Eclipse
The problem should have gone, these steps work more than fine for me
1).did you added your lib project to the main project?? Make sure..
2).also add the project to your lib project by doing this process--
In the lib project-->>right click on project-->>java build path-->>on the project tab-->>add your main project.
Now build your project..hopefully it will help you.
EDITED::
3). Go to the project properties..edit this(can give some space) and then save..clean project...then build..
I tackled with this kind error in Android Studio.
In my case my main project was using two my own lib. But beside this those two libs were using the same library as external included
compile files('lib/external-lib.jar')
I solved it by doing following in my both own libs.
1)Removing old compile files('lib/external-lib.jar' ) from build.gradle and deleting old external_lib.jar from lib folder.
2)Adding library from jcenter() two my own libs
compile 'external.lib:1.9.2'
3)Rebuild.
Then rebuild and run main project
Then problem has disappeared.