Popular New Releases in Java
spring-boot
v2.6.7
elasticsearch
Elasticsearch 8.1.3
mall
v1.0.1
spring-framework
v5.3.19
RxJava
3.1.4
Popular Libraries in Java
by CyC2018 java
137910
:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计
by Snailclimb java
110287 Apache-2.0
「Java学习+面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识。准备 Java 面试,首选 JavaGuide!
by iluwatar java
74302 NOASSERTION
Design patterns implemented in Java
by MisterBooo java
66783
Demonstrate all the questions on LeetCode in the form of animation.(用动画的形式呈现解LeetCode题目的思路)
by spring-projects java
60742 Apache-2.0
Spring Boot
by elastic java
59266 NOASSERTION
Free and Open, Distributed, RESTful Search Engine
by doocs java
57101 CC-BY-SA-4.0
😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识
by kdn251 java
53816 MIT
Everything you need to know to get the job.
by macrozheng java
52180 Apache-2.0
mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于SpringBoot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。
Trending New libraries in Java
by geekxh java
29811
🌍 针对小白的算法训练 | 包括四部分:①.算法基础 ②.力扣图解 ③.大厂面经 ④.CS_汇总 | 附:1、千本开源电子书 2、百张技术思维导图(项目花了上百小时,希望可以点 star 支持,🌹感谢~)
by chefyuan java
8824 MIT
专门为刚开始刷题的同学准备的算法基地,没有最细只有更细,立志用动画将晦涩难懂的算法说的通俗易懂!
by dromara java
8497 Apache-2.0
这可能是史上功能最全的Java权限认证框架!目前已集成——登录认证、权限认证、分布式Session会话、微服务网关鉴权、单点登录、OAuth2.0、踢人下线、Redis集成、前后台分离、记住我模式、模拟他人账号、临时身份切换、账号封禁、多账号认证体系、注解式鉴权、路由拦截式鉴权、花式token生成、自动续签、同端互斥登录、会话治理、密码加密、jwt集成、Spring集成、WebFlux集成...
by google java
7291 Apache-2.0
Tsunami is a general purpose network security scanner with an extensible plugin system for detecting high severity vulnerabilities with high confidence.
by metersphere java
7173 GPL-3.0
MeterSphere 是一站式开源持续测试平台,覆盖测试管理、接口测试、性能测试等。搞测试,就选 MeterSphere!
by airbytehq java
6468 NOASSERTION
Airbyte is an open-source EL(T) platform that helps you replicate your data in your warehouses, lakes and databases.
by yuanguangxin java
5890
LeetCode刷题记录与面试整理
by supertokens java
5681 Apache-2.0
Open source alternative to Auth0 / Firebase Auth / AWS Cognito
by dataease java
5595 GPL-3.0
人人可用的开源数据可视化分析工具。
Top Authors in Java
1
7337 Libraries
803
2
2045 Libraries
287
3
1372 Libraries
54443
4
1036 Libraries
441599
5
839 Libraries
0
6
739 Libraries
1
7
582 Libraries
1
8
572 Libraries
13
9
572 Libraries
429
10
522 Libraries
8
1
7337 Libraries
803
2
2045 Libraries
287
3
1372 Libraries
54443
4
1036 Libraries
441599
5
839 Libraries
0
6
739 Libraries
1
7
582 Libraries
1
8
572 Libraries
13
9
572 Libraries
429
10
522 Libraries
8
Trending Kits in Java
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.
In this kit, we build a basic Java Programming application to calculate interests of deposits, account transactions and other functionalities of a sample account in the Banking domain.
Knowlege resources on Java-basics
Support
For any support, you can reach us at OpenWeaver Community Support
Java Encryption Libraries enable password encryption, digital signatures, secure random number generation, message authentication, and 2FA.
Encryption, decryption, and key generation are the three most crucial aspects of Java cryptography. Key-based data security can be enabled in two ways, using symmetric or asymmetric encryption algorithms, considering how secure the code needs to be. Moreover, developers can easily enable security functions directly into the code with the set of APIs available in the Java Cryptography Architecture (JCA). The JCA is the core of java encryption and decryption, hashing, secure random, and various other java cryptographic functions.
Check out the below list to find more trending Java encryption libraries for your applications:
tink
- Offers various cryptographic functions like encryption, digital signatures, and more.
- Provides an easy-to-use interface, simplifying the implementation of robust security measures.
- Follows best practices, minimizing the chance of security vulnerabilities in cryptographic operations.
bc-java
- Provides various encryption, signatures, and hashing algorithms.
- Offers flexible options for cryptographic operations to suit various protocols.
- Seamlessly integrates into Java applications for strong security features.
jasypt
- Supports many encryption methods for tailored security.
- Seamlessly integrates encryption features into Java codebases.
- Allows easy setup of encryption configurations for different use cases.
cryptomator
- Encrypts files before uploading them to the cloud, keeping data private.
- Can easily access encrypted files and work with your data as usual.
- Enables secure file storage and access from different environments.
Aegis
- Offers authenticated encryption schemes, ensuring both data confidentiality and integrity.
- Provides a user-friendly and straightforward API for implementing cryptographic operations.
- Is lightweight and easy to carry, so it works well in limited environments or small systems.
mockserver
- Facilitates creating mock servers for testing and simulating HTTP/HTTPS interactions.
- Setting precise expectations for requests and responses helps thoroughly test API interactions.
- Can save API requests to reuse in tests for accuracy and reproducibility.
hawk
- Offers a strong MAC algorithm for verifying the integrity and authenticity of messages.
- Utilizes an authorization header to transmit authentication information, enhancing security securely.
- Works across various platforms and languages, allowing integration into different applications and systems.
GDA-android-reversing-Tool
- Can learn about Android apps by analyzing them using reverse engineering.
- Helps analyze and break down the code of Android apps for inspection.
- The graphical interface makes it easy to use the reverse engineering features.
wycheproof
- Enables testing cryptographic algorithms and libraries for known security vulnerabilities and weaknesses.
- Have many cryptography test cases to ensure it works well in different situations.
- Helps confirm if cryptographic implementations work well on different platforms and libraries.
bt
- Can share files, reducing the need for central servers and speeding up downloads.
- To speed up downloads, it uses a method called "swarming." This method collects small pieces from many sources simultaneously.
- The protocol will download from other sources if a source is unavailable. This ensures that downloads are uninterrupted and strong.
Peergos
- Provides strong file encryption, ensuring data privacy and security from unauthorized access.
- Users gain control over their data. They can securely share files and manage access permissions.
- It uses a network not centered in one place to save and find files. This makes it so we don't have to rely on one main server, which helps ensure the data is always there and strong.
i2p.i2p
- Let users browse websites and send messages without showing their IP addresses.
- Uses powerful encryption to keep data safe and secure when it's sent.
- The routing mechanism is not centralized. This makes it difficult for others to track online activities.
secure-preferences
- We use encryption to protect private information from people who shouldn't see it.
- It works with Android's SharedPreferences API. This means you can easily use secure data storage without changing much code.
- The app protects sensitive information, reducing the risk of data breaches or leaks. It enhances user privacy.
AndroidWM
- Can add personalized watermarks to images, improving branding and ownership recognition.
- Can choose where the watermark goes, how big it is, how see-through it is, and what it looks like.
- Can process many images together, which makes it simpler to add watermarks to them.
Cipher.so
- Can easily use native code for cryptography in Android apps.
- Optimized cryptographic algorithms for efficient and secure data encryption and decryption.
- Supports various encryption and decryption methods, enabling customization based on specific security requirements.
conscrypt
- Uses many different ways to keep data safe when encrypted or sent.
- Offers up-to-date TLS and SSL protocol versions for secure network communication.
- Ensures compatibility with older Android versions, allowing applications to maintain security across devices.
react-native-sensitive-info
- Can securely store sensitive information like passwords or tokens.
- Compatible with both Android and iOS, ensuring consistent security practices across different platforms.
- Utilizes encryption mechanisms to protect sensitive data from unauthorized access.
android-storage
- Simplifies data storage and retrieval tasks in Android apps, promoting efficient data handling.
- Offers the option to encrypt files stored on the device, enhancing data security.
- Can focus on how things work instead of how things are stored.
whorlwind
- Offer tools to protect data when stored and transferred, ensuring it stays safe.
- Supports various encryption algorithms for different security needs.
- Designed for use across various platforms, promoting consistent security practices.
encrypt
- Enables encryption and decryption operations within Android applications.
- Supports many encryption algorithms, offering flexibility in choosing the appropriate method.
- Simplifies the process of implementing encryption-related functionalities.
java-aes-crypto
- Offers AES encryption and decryption capabilities, a widely used symmetric encryption algorithm.
- Provides mechanisms for secure key generation and management within Java applications.
- Supports cryptographic modes that ensure both data confidentiality and integrity.
Android-Goldfinger
- Facilitates fingerprint-based authentication and access control in Android apps.
- Enhances user security by integrating biometric authentication.
- Offers a user-friendly interface for integrating fingerprint-related functionalities.
AESCrypt-Android
- Implements AES encryption and decryption for protecting sensitive data in Android applications.
- Provides straightforward methods for incorporating AES cryptography into your code.
- Enables users to store and transmit sensitive information securely.
Secured-Preference-Store
- Enhances SharedPreferences with encryption, safeguarding sensitive user preferences.
- Offers a seamless way to integrate secure preference storage without extensive code modifications.
- Prevents unauthorized access to preference data by implementing encryption mechanisms.
EncryptedPreferences
- Integrates secure storage mechanisms for sensitive preferences in Android apps.
- Implements encryption to prevent data exposure or tampering.
- Provides an API for easily incorporating encrypted preference storage in Android projects.
FAQ
What are Java encryption Libraries, and what basic encryption capabilities do they provide?
Java encryption libraries are tools used to improve data security in Java applications. They help implement cryptographic techniques. They offer:
- AES (Advanced Encryption Standard): Symmetric encryption for secure data transmission.
- RSA (Rivest–Shamir–Adleman): Asymmetric encryption for secure key exchange and digital signatures.
- Hashing Algorithms: Generate secure hash codes to verify data integrity.
- Digital Signatures: Authenticate data origin and verify integrity.
- Key Management: Generate, store, and handle encryption keys.
- SSL/TLS: Implement secure communication over networks.
- PGP (Pretty Good Privacy): Encrypt and decrypt data for privacy.
How can password encryption be achieved using Java libraries?
In Java, you can encrypt passwords using JCA or third-party libraries. Hashing algorithms, such as bcrypt and SHA-256, convert passwords into irreversible codes. To keep user credentials safe, adding salt and storing them securely is important. This helps to prevent attacks and maintain confidentiality.
Are digital signatures supported by any of the Java encryption libraries?
Yes, digital signatures are supported by various Java encryption libraries. Java Cryptography Architecture (JCA) libraries enable the creation and verification of digital signatures. They use algorithms like RSA for asymmetric encryption. Digital signatures are important in Java applications for secure communication and authentication. They ensure data is authentic, integral, and cannot be denied. Bouncy Castle and other Java libraries can help with digital signatures and cryptography.
What is an encryption key, and how is it used to encrypt and decrypt data securely?
An encryption key is a special code that turns normal data into secret code and back again. It decides how data is changed so only authorized people with the right key can see it. Strong key management is essential to maintain data security and prevent unauthorized access.
Encryption keys are crucial for secure communication. Data is kept safe from unauthorized access. This happens when it's being transmitted or stored.
Can you create a Message Authentication Code using a popular Java encryption library?
Developers can use algorithms, such as HMAC from JCA, to implement MAC for security. The sender creates a code that receivers can check using a secret key. This process ensures data is correct and information is secure when sent.
Is there an easy way to generate cipher text from plain text using a library written in Java?
Java has libraries like JCA that help turn plain text into secret code. Developers can change plain text into cipher text. They do this by choosing an encryption algorithm, such as AES, and using a secret key. They can do this through straightforward method calls. Java applications can securely transmit and store data while keeping it confidential. Developers can easily add strong encryption using these libraries without needing complex coding.
Two-factor authentication (2FA) is a multifactor security process where users must authenticate their identity with two different means. This ensures better protection of secured assets and information.
Traditional username and password combinations are prone to hacking and getting hacked has been on the rise. Implementing 2FA authentication will prevent hackers from accessing your accounts even if your password is stolen. 2FA is a recommended practice for securing all your online accounts and devices to protect sensitive information losses.
You will need a different set of components with features ranging from creating the secret codes, accessing and authenticating.
OTP:
Time-based One-Time Password involves generating a one-time password from a shared secret key and the current timestamp using cryptographic algorithms. These libraries will help you generate secrete one-time passwords
SMS
Typically the OTP codes are sent to the user's mobile phone using SMS. This also helps to validate the user's mobile number correctness. The user can then enter the secret code into the application to complete the multifactor authentication. The below libraries will help in sending SMS from your application.
The unique generated one-time password is sent via email to the user. The user uses the code from the email and enters the code into the application to confirm the authentication.
Biometric Authentication
Using Biometrics for authentication has been made easy with mobile devices. Biometrics can include different choices, such as using fingerprints, voice, and face as the secondary authentication mechanism.
Push Notifications
Typically, push notifications are sent to your mobile app to authorize login requests. It will include the details of the access device details and once authorized, the login to the application is allowed. Below libraries help in implementing the push notification-based authorization.
Here are some famous Java Geospatial Libraries. Some Java Geospatial Libraries' use cases include Location-based services, GIS analysis, Spatial databases, Web mapping applications, and Mobile applications.
Java geospatial libraries refer to a set of software libraries written in the Java programming language that can be used for creating, manipulating, and analyzing geospatial data. These libraries allow developers to quickly and easily incorporate geospatial operations into their applications, such as mapping, searching, route optimization, and more.
Let us have a look at some of the famous Java Geospatial libraries.
geoserver
- Supports advanced geometry operations, such as buffer, intersect, and union.
- Has an extensive set of RESTful APIs.
- Includes a robust security system.
proj4js
- Support for a wide range of coordinate systems.
- Ability to transform to and from multiple coordinate systems.
- Open source and freely available.
jts
- Supports polygonal and lineal geometry operations.
- Provides a complete set of basic and extended spatial predicates and functions.
- Designed to be thread-safe, so multiple threads can safely access the same geometry object.
geotools
- Provides powerful tools for managing large, complex geospatial datasets.
- Released under the LGPL open source license, making it free to use and modify.
- Highly portable and makes it easy to share code .
geomesa
- Support large-scale spatial analysis and data management, leveraging distributed storage and computation frameworks.
- Supports a wide range of data formats and encodings, including GeoJSON, GML, and WKT.
- Allows users to perform vector and raster analytics on large datasets.
h2gis
- Offers a range of spatial analysis functions including buffer distance calculation and more.
- Implements a custom R-Tree indexing scheme to support fast queries on geospatial data.
- Offers an easy-to-use SQL interface to manipulate geospatial data stored in an H2 database.
udig-platform
- Offers a drag-and-drop feature that allows users to visualize and edit GIS data.
- Offers a fully integrated geoprocessing framework and an extensive library of GIS algorithms.
- Has a sophisticated API and extensible plug-in architecture.
geoapi
- Designed to be extensible and provides the ability to add custom data formats, services, and operations.
- Written entirely in Java and is designed to be lightweight and fast.
- Highly portable and can be used on any platform that supports Java.
Java E-Commerce Libraries help build e-commerce websites. It provides various frameworks, tools, and utilities for developing online shopping websites.
There are many Java E-Commerce libraries available in the market, which enable you to write your own e-commerce website in easy steps. Java E-Commerce Libraries like shopizer, micro-ecommerce, and keyist-ecommerce are also used for developing an eCommerce website. These libraries are used in e-commerce applications since they provide a platform for making payment gateways, shopping carts, and other functionalities of an e-commerce website.
Shopizer is the most popular Java e-commerce library that allows you to create a customized online store without any coding. It comes with integrated payment gateways, shipping plugins, and many other features, which make it one of the best options for small businesses looking to start an online store. Keyist-Ecommerce is an open-source Java library that allows you to build an online store with minimal effort and time. The library supports multiple languages, including English, Chinese, Japanese and Korean. It also offers integrated payment gateways, shipping plugins, and other features that make it easy for developers to build custom websites without having to write any code themselves. Micro-eCommerce is an open-source Java library that allows you to build an online store without any coding knowledge required by developers. It has over 350 features built in along with integrated payment gateways, shipping plugins, and many other features that make it easy for developers to create custom websites. Some of the most popular Java E-Commerce Libraries among developers are given below
shopizer:
- Shopizer is an open-source e-commerce software platform designed for building.
- It is a flexible and customizable solution for businesses.
- Shopizer is released under the Apache 2.0 license, making it open-source and free to use.
eCommerce-order-service:
- eCommerce-order-service is a Java library typically used in websites and e-commerce applications.
- It has a Permissive License, and it has a medium support.
- It handles various aspects related to customer orders.
micro-ecommerce:
- Micro-ecommerce might refer to the use of microservices architecture in the context.
- This architecture aims to improve scalability, maintainability, and agility in the development.
- Micro-ecommerce helps describe smaller or lighter e-commerce businesses.
Keyist-Ecommerce:
- Keyist-Ecommerce is a term used within a specific context or community.
- It may be beneficial to seek information from sources associated with that context.
- This will provide the most accurate and up-to-date information about its features and functionalities.
e-commerce-microservice:
- e-commerce microservice refers to the application of microservices architecture in the development.
- Microservices architecture is an approach where a large and complex application decomposes.
- Microservice in the e-commerce system handles a specific business capability.
ddd-example-ecommerce:
- DDD is an approach to software development. It emphasizes understanding the business domain and modeling it in code.
- DDD often involves defining bounded contexts to encapsulate specific business domains.
- DDD distinguishes between entities and value objects. Entities have an identity and are mutable.
Android-E-Commerce-Shopping-Application:
- Android-E-Commerce-Shopping-Application is a Java library. It is typically used in Retail, Security, Authentication, and Firebase applications.
- Android-E-Commerce-Shopping-Application has no bugs or vulnerabilities.
- It has a Permissive License, and it has low support.
Ecommerce-Morningmist-Android:
- Ecommerce-Morningmist-Android is a Java library that is typically used in retail websites.
- Ecommerce-Morningmist-Android has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
FAQ
1. What are Java E-commerce Libraries?
Java E-commerce Libraries are sets of pre-built, reusable code components and functionalities. These libraries often include modules for product management, cart handling, and payment processing.
2. Why use Java for E-commerce Development?
Java is popular for its portability, scalability, and robustness. It's platform-independent, making it suitable for building enterprise-level applications. Java has a vast ecosystem and community support. It also contributes to its popularity in e-commerce.
3. Which Java E-commerce Libraries are widely used?
Some widely used Java E-commerce Libraries include:
- Broadleaf Commerce: An open-source, customizable framework for building e-commerce solutions.
- Hybris: A robust and scalable e-commerce platform.
- Apache OFBiz (Open for Business): An open-source framework for building enterprise automation applications.
4. How can I integrate Payment Gateways with Java E-commerce Libraries?
Java E-commerce Libraries often provide APIs or modules for integrating with popular payment. The Developers follow the documentation provided by the library in a specific way.
5. Are there Java E-commerce Libraries suitable for small businesses?
Yes, some Java E-commerce Libraries cater to the needs of small businesses. The Smaller libraries or frameworks may also be suitable for lightweight e-commerce requirements.
Over the past few years, we’ve witnessed a significant rise in the usage of algorithmic trading bots, especially by sophisticated institutions.
These bots follow a set of predefined rules and place and place trades to generate high-frequency profits in the stock market. However, the cryptocurrency market is still nascent, and yet algorithmic trading is now accessible to all retail and individual traders alike. Many of these trading bots are developed using Java libraries. Here are some of the best Java algorithmic trading libraries. Released under the Apache license, Coin Trader is a Java-based backend for trading cryptocurrencies. It is connected to many crypto exchanges and offers various features, including but not limited to simulated crypto trading live order execution, 24-hour OHLC bars, and backorder routing.
Knowm’s XChange offers a simple and consistent API connecting more than 60 crypto exchanges with modular components which are under active development. Another one, ta4j, is an open-source, 100% pure Java library with 130+ indicators essential to technical analysis. It comes equipped with basic components which are necessary for creating, testing, and executing a range of trading strategies. Developers tend to use some of the following trending open-source libraries:
XChange
- Provides a consistent API for interacting with various cryptocurrency exchanges.
- Cryptocurrency exchanges can access market data, place orders, and manage accounts.
- Supports various cryptocurrency exchanges like Coinbase Pro, Bitstamp, Binance, and Kraken.
ta4j
- Provides tools for performing technical analysis on financial data.
- Helps build and test trading methods in Java.
- Helps you create and test trading methods that use technical analysis indicators.
Used-Trading-Platform
- Is a Java library used for Object-Relational Mapping, Utilities, and Spring applications.
- Allows developers to integrate trading functionalities into their applications.
- Supports the development of custom indicators and trading methods.
bateman
- Designed to facilitate the development and execution of algorithmic trading methods.
- Provides various functions for strategy development, live trading, data analysis, and backtesting.
- Helps automate trading decisions based on predefined rules and market indicators.
tsharding
- Used by algorithmic trading firms, individual developers, and quantitative traders.
- Helps connect their trading algorithms directly to their brokerage accounts.
- Provides unified API to access many cryptocurrency exchanges.
bxbot
- Makes algorithmic trading bots easier to develop with new features.
- Users could implement and customize their trading methods using the provided framework.
- Fetches real-time market data, enabling trading decisions based on the latest information.
CoinExchange_CryptoExchange_Java
- Provides a simple and easy-to-use interface for strategy development.
- Allows users to develop and test trading algorithms on historical data.
- Helps connect their trading algorithms directly to their brokerage accounts.
univocity-trader
- Helps create and test trading strategies using past and current market information.
- Test their trading methods on past data to see how well they performed.
- Helps implement risk management rules to control position sizing and risk exposure.
parity
- Designed to facilitate the development of high-performance, ultra-fast trading applications for financial markets.
- Can handle market data feeds, manage risks, execute orders, and handle financial instruments.
- Provides functions for order submission, modification, cancellation, and tracking.
Axon-trader
- Helps build event-driven, Command Query Responsibility Segregation applications.
- Helps build scalable and maintainable applications.
- Can save and find an application's status using a sequence of events.
cointrader
- Is a Java-based backend for algorithmically trading cryptocurrencies.
- Provides data collection and export, complex event processing, triggering, and backtesting.
- Enables developers to integrate cryptocurrency trading functionality into their applications.
trading-backtest
- Helps in backtesting and live trading of financial strategies.
- Offers extensive features for strategy development and optimization.
- Provides built-in backtesting capabilities for their supported trading strategies.
binance-trader
- A flexible and feature-rich library for backtesting and live trading of financial strategies.
- Provides a simple and easy-to-use interface for strategy development.
- Allows you to develop and test trading algorithms on historical data.
xmarket
- Includes functions for pricing and risk management of financial instruments.
- Support for automated trading strategies, connectivity to various exchanges, and risk management.
- Helps connect their trading algorithms directly to their brokerage accounts.
philadelphia
- Designed to facilitate the development and execution of algorithmic trading strategies.
- Offers functions for strategy development, live trading, backtesting, and data analysis.
- Helps automate trading decisions based on predefined rules and market indicators.
FAQ
What is backtesting and paper trading, and how can they be used for algorithmic trading with Java?
Backtesting and paper trading are essential components of algorithmic trading. Before trading, traders and developers can improve their methods by reviewing them. Backtesting is when you test a trading strategy on old market data to see how it would have worked before. Paper trading is a practice where traders execute trades without using real money.
Which Python libraries are commonly used for algorithmic trading?
Python is a popular programming language for algorithmic trading. It's simple, flexible, and has many libraries. Here are some popular Python libraries frequently used for algorithmic trading:
- Backtrader
- Zipline
- QuantConnect
- PyAlgoTrade
- CCXT
- TA-Lib
- pandas
- NumPy and SciPy
- TensorFlow and PyTorch
- vn.py
- AlgoTrader
- Lean Algorithm Framework
How does the engine work in an algorithmic trading system?
The trading system's engine executes trading methods, processes orders, and manages trades. It is a critical part of the overall system architecture. It directly interacts with the markets. It ensures that trading methods are executed efficiently and accurately. The trading engine has two parts. These parts are the Order Management System and the Execution Management System.
Here is how the engine works in an algorithmic trading system:
- Strategy Execution
- Order Management System
- Risk Management
- Execution Management System
- Order Routing and Matching
- Real-time Monitoring
- Record Keeping
Are there any advantages to using automated trading bots over manual trades?
Automated trading bots and manual trading each have their benefits. Automated trading bots have pros and cons compared to manual trades.
Advantages:
- Speed and Efficiency – Bots can execute trades in milliseconds. This can be crucial in high-frequency trading, where quick reactions are needed.
- Consistency – Bots follow predefined rules without emotions. It avoids the impact of human biases and erratic decision-making.
- Backtesting & Optimization – Bots can improve their strategies by testing with old data. This helps identify potential issues before deploying them in live trading.
- Diversification – Bots can manage many strategies and trading pairs simultaneously, providing diversification benefits.
- Algorithm Complexity – Bots can handle complex strategies with many indicators and conditions. Manual traders may find this challenging.
Are there any open-source solutions for developing an algorithmic trading library using Java?
You can use Java to create an algorithm trading library with open source solutions. Java is a popular programming language for making trading applications. It's fast, flexible, and has many useful libraries. Here are a few open source options to consider:
- QuantConnect Lean
- AlgoTrader
- Tradelink
- QuickFIX/J
- XChange
Which electronic products are suitable for algorithmic traders using Java libraries for trading?
Java library users can apply their strategies to various electronic trading products. Traders choose products based on knowledge, goals, risk tolerance, and library capabilities. These products are traded electronically using Java libraries and algorithmic strategies.
- Equities and Stocks
- Futures and Options
- Foreign Exchange (Forex)
- Cryptocurrencies
- Fixed Income
- Commodities
- Exchange-Traded Funds (ETFs)
- Spread Betting and Contracts for Difference (CPDs)
- Index Funds and ETF Rebalancing
- Algorithmic Market-Making
If traders help trading algorithms, where can they find financial information?
Alternative financial data can provide valuable insights for algorithmic trading strategies. If you use a Java library for trading, you can find data sources to help with decisions.
- News APIs and Feeds
- Bloomberg API
- Reuters Connect API
- Alpha Vantage API
- Financial News Websites
- Social Media Platforms
- Event Calendars
- Government and Regulatory Websites
- Specialized News Providers
- Web Scraping
- Natural Language Processing
- Data Vendors
- Financial Data Platforms
There are numerous libraries in Java that enable working with document files. An extensive and well-liked Java library is XDocReport.
A Java package called XDocReport enables you to create reports from documents in various formats, including Microsoft Word, OpenOffice, and others. It can be used to generate reports using information from many different sources, such as databases and XML files. The library enables the ability to add styles, graphics, and other formatting choices to the resultant reports. Popular Java frameworks like Apache POI, Freemarker, and Velocity can be coupled with XDocReport to offer a strong and adaptable solution for producing reports in your Java-based applications.
Here is an example of how to convert a docx file to a pdf file using XDocReport in Java:
Fig 1: Preview of the output that you will get on running this code from your IDE
Code
- Copy the code using the "Copy" button above, and paste it in a Java file in your IDE.
- Add dependent library or download the dependent jar and add in your IDE class path.
- replace the file name in the variables- docPath and pdfPath
- Run the file to convert docx to pdf file.
I hope you found this useful. I have added the link to dependent libraries, version information in the following sections.
I found this code snippet by searching for "convert docx to pdf in java" in kandi. You can try any such use case!
Development Libraries
You can add the dependent library in your gradle or maven files. you can get the dependancy xml in above link.
You can search for any dependent library on kandi like XDocReport
Environment Tested
I tested this solution in the following versions. Be mindful of changes when working with other versions.
- The solution is created in open-jdk-11.0.8.
- The solution is tested on XDocReport 2.0.4 version.
Using this solution, we are able to convert an file using the XDocReport library in Java with simple steps. This process also facilities an easy to use, hassle free method to create a hands-on working version of code which would help us convert docx to pdf file in Java.
Support
- For any support on kandi solution kits, please use the chat
- For further learning resources, visit the Open Weaver Community learning page.
A session cookie is a type of cookie stored in a user's web browser and is only valid for the user's visit to a website. Once the user closes their web browser or navigates away from the site, the session cookie is deleted.
Session cookies are frequently used to store transient data required for a user's visit to a website, including the items in their shopping cart or their preferred language. They are not kept on the user's computer and cannot be accessed once the session has finished. The Java HTTP Client can be used in various ways to set a session cookie. Typical use scenarios include:
- Persistent login sessions: A session cookie with a specific session ID may be set by the server when a user logs into a website. The user can then remain logged in to the website as long as the cookie is present by identifying themselves in subsequent requests.
- Tracking user behavior: Session cookies can be used to monitor a user's behavior on a website, including the pages they view and for how long.
- Keeping user choices in mind throughout visits to the site: Session cookies can be used to maintain user preferences across visits to the site, such as the language or theme that the user prefers.
- Enhancing performance: By saving frequently used information in a session cookie, fewer requests may be sent to the server, which improves the site's overall performance.
Here is how you can set a session cookie with the Java HTTP Client:
Preview of the output that you will get on running this code.
Code
In this solution we have used Http client function of the java.net library.
- Copy the Code by clicking "Copy" button above , and paste it in your Java IDE
- Add the java.net Library to run the code
- Run the code to get the output
I hope you found this useful. I have added the Dependent Libraries and versions information in the following sections
i found this code snippet by searching "Setting a session cookie with the Java HttpClient".
Dependent Library
If you don't have the java Http library to run this code ,you can install it just by clicking the Http request library.
you can search any Library like Http in Kandi.
Environment Test
I tested this solution in the following versions. Be mindful of changes when working with other versions.
- I have created and executed the solution in java eclipse 19.0.1
- I have tested in java Http version 4.2.3
In this solution we are going to parse Nested XML with same tag name using Jsoup in java with simple steps. This process also facilities an easy to use, hassle free method to create a hands-on working version of code which would help us parse Nested XML with same tag name using Jsoup.
Support
Support
- For any support on kandi solution kits, please use the chat
- For further learning resources, visit the Open Weaver Community learning page.
Globally, there are 2.2 billion people with vision impairment. They are facing constant challenges like navigating from one place to another on their own. They are dependent on another individual for accessing their basic day-to-day needs. So, it's a pretty challenging task. You can customize and use the following libraries to develop applications for guiding visually impaired people to move places. The application will show the visually impaired user the object's name, direction, and distance around them and help them navigate. Following are the steps to be followed for building the solution, 1. Object Detection 2. Accessing Cameras 3. Image Processing 4. Measuring the Distance
Accessing the Cameras
These libraries are used to access the camera for taking images for object detection.
Measuring the Distance
These libraries are used to measure the distance between camera and object.
Object Detection
These libraries are used to detect the objects in the image.
Image Processing
These libraries are used to process the captured image.
Today data has generated constantly, and business needs the latest data to be used for business decisions via intelligent applications. This requires constantly processing data in a streaming fashion to get the lower latency. This will also allow optimum usage of the resources and get the up-to-date data loaded into the systems.
Stream processing involves multiple processing steps in near real-time as the data is produced, transported, and received at the target location. Some examples of such processing requirements processing data in motion are from continuous streams from sensors in IT infrastructure, machine sensors, health sensors, stock trade activities, etc
To create an end-to-end stream processing, you will need components performing different tasks stitched together in a pipeline and workflow.
Streaming
Using the below libraries, you can build you own correct concurrent and scalable streaming applications.
Stream processing engine
The below open-source stream processing framework provide you with stream processing capabilities.
Data Pipeline
Below libraries help in defining both batch and parallel processing pipelines running in a distributed processing backends.
Java face recognition libraries provide components to build AI systems with face detection and recognition. It detects faces, gender, biometrics, and more.
In the fields of augmented reality and artificial intelligence, you can use such an open-source library that implements face recognition technology into your application. This technology can be applied to prevent crimes, unlock phones, execute smart advertising, find missing people, ensure law enforcement, aid forensics, and so on. OpenCV is an open-source computer vision library with several modules for object detection, face recognition, and augmented reality. The flexibility and scalability of Java, combined with the applications of AI systems, can build recognition software with ease and finesse.
Below are our picks of the 24 best Java face recognition libraries that are open-source in 2021. You can use components from these libraries to build AI software and implement face recognition features in your application. FaceDetector is a face recognition library for Android apps that also works perfectly with Fotoapparat. It can be used with any camera library or source of your choice. On the other hand, Fast-face-Android is an Android app for real-time face landmark detection. It lets you check landmarks in 60ms and works with a HOG detector. FaceRecognition, on the other hand, helps you implement face detection using PCA, LDA, and LPP in Java through the K-nearest neighbor classification algorithm. These libraries have different features that can enhance your project and suit your requirements.
mlkit:
- It is a mobile SDK provided by Google. It brings machine learning capabilities to Android and iOS apps.
- It provides cloud-based services, allowing for more powerful and dynamic face recognition capabilities.
- ML Kit optimizes performance on mobile devices.
FaceDetector:
- It plays a major role in identifying and locating faces within images.
- It enables the extraction of facial features. It needs features like face recognition, emotion detection, and analyzing facial expressions.
- These libraries can detect and analyze human faces in different applications.
PicassoFaceDetectionTransformation:
- PicassoFaceDetectionTransformation is a Java library.
- It is a Java library used in Artificial Intelligence, Computer Vision applications.
- This Android image library saves memory by cropping images above Face Detection.
FaceRecognitionApp:
- It can control who gets into sensitive areas or systems so only authorized people can enter.
- It is a safe way for users to prove who they are instead of using passwords or PINs.
- Integrating face recognition in applications automates processes, reducing the need for manual verification.
fast-face-android:
- It is a tool designed for efficient face recognition on Android platforms.
- It is crucial for applications that need real-time processing. The process is such as surveillance systems or user authentication.
- Security-related apps must ensure that unauthorized people cannot access them.
GlideFaceDetectionTransformation:
- It is a Java library used in Artificial Intelligence, Computer Vision applications.
- Glide is an Android library that transforms images. It saves memory by cropping around faces.
- It can be valuable for apps that involve working with images containing faces. Those are such as social media apps or photo editing tools.
Android-Face-Recognition-with-Deep-Learning-Library:
- It refers to a specific library for face recognition using deep learning in Java for Android.
- It is often used for security purposes. Those purposes are such as unlocking devices or accessing sensitive information.
- Use this to personalize user experiences within applications.
Android-Face-Recognition-with-Deep-Learning-Test-Framework:
- The "Android-Face-Recognition-with-Deep-Learning-Test-Framework" in Java can be significant for face recognition libraries.
- It helps test how well face recognition models work in different situations.
- It helps improve how face recognition works on Android devices.
face-landmark-android:
- To recognize faces, we need to find and locate specific points on the face in pictures.
- These landmarks are specific points on a face, such as eyes, nose, and mouth corners.
- It improves the abilities of face recognition apps made with Java programming language.
Cognitive-Face-Android:
- It is a Java library for face recognition. It provides tools to integrate facial recognition capabilities into Android applications.
- To enhance security, Android apps verify users' distinct facial features for identification.
- Applications using face recognition can personalize user experiences based on detected facial features.
hms-ml-demo:
- It helps with Artificial Intelligence, Computer Vision, Deep Learning, Tensorflow applications.
- This project includes apps developed based on HUAWEI ML Kit.
- It provides an example of integrating Huawei ML Kit service into applications.
FaceRecognition:
- It is significant for various apps. It includes security systems, user authentication, and personalized user experiences.
- It enhances security by providing a biometric authentication method.
- Applications can use face recognition to personalize user experiences.
marvel:
- It is a Java library used in AI, Computer Vision, and OpenCV applications.
- It is an open-source Android application that does face recognition using OpenCV.
- It helps with attendance marking in college. Marvel also assists with any generic use case of face recognition.
FaceDetectCamera:
- It is crucial for capturing real-time video or images from the device's camera to detect faces.
- Developers can integrate face recognition capabilities into their Java apps. It allows to perform dynamic and interactive face detection.
- It plays a role in connecting the face recognition algorithm with the device's camera.
boo:
- boo is a Java face recognition library.
- Boo is an Android Experiment. Cute little creatures crowd the screen.
- A face detection algorithm determines if the creatures are being watched.
MTCNN4Android:
- It is an implementation of the MTCNN algorithm for face detection on Android devices.
- It provides an efficient and accurate way to detect faces in images or video streams.
- It helps in handling face localization, alignment, and scaling. These are essential for robust face recognition in Java applications on Android.
LookAtMe:
- LookAtMe is a Java face recognition library.
- It helps in Artificial Intelligence, Computer Vision, OpenCV applications.
- LookAtMe has no bugs, it has built files available, it has a Permissive License, and it has low support. You can download it from GitHub.
react-native-facerecognition:
- react-native-facerecognition is a Java face recognition library.
- It helps in Artificial Intelligence, Computer Vision, and OpenCV applications.
- It helps in face detection and recognition.
awesome-ai-services:
- It is a Java library used in AI, Speech, and Deep Learning applications.
- It plays a crucial role in this library by enhancing its capabilities.
- These services often provide pre-trained models and APIs. You can integrate those models and APIs into Java apps.
react-native-facerecognition:
- It is a React Native module for incorporating face recognition into mobile applications.
- These libraries provide face recognition capabilities for Java applications.
- It allows you to integrate facial recognition features into your projects in Java.
Android-MobileFaceNet-MTCNN-FaceAntiSpoofing:
- Android-MobileFaceNet-MTCNN-FaceAntiSpoofing represents a comprehensive set of components for robust face recognition on Android.
- This component is likely a deep learning model. It optimizes face recognition for mobile devices.
- It is a face detection algorithm known for its ability to detect faces in images with varying scales.
TrackEyes:
- TrackEyes is a Java face recognition library.
- It helps in Artificial Intelligence, Computer Vision, Tensorflow, OpenCV applications.
- It is a simple Android tracking and detection app.
AndroidFaceRecognizer:
- It is a Java library used in Mobile, Android, OpenCV applications.
- This is a face detection and recognition app on Android based on Android OpenCV Android SDK.
- It includes Java and NDK features. You can install an application from Google Play.
face-detection:
- It is a Java library used in User Interface, OpenCV, JavaFX applications.
- It plays a crucial role in Java face recognition libraries. It serves as the initial step in identifying and analyzing faces within an image or video stream.
- It allows the system to locate and extract facial features. It provides essential data for later face recognition tasks.
FAQ
1. What is a Java face recognition library?
A Java face recognition library is a set of tools and algorithms. It enables developers to integrate facial recognition capabilities into their Java applications.
2. How do face recognition libraries work?
These libraries use computer vision algorithms. It analyzes and identifies facial features, creating a unique template for each face. The templates are then compared to recognize or verify individuals.
3. Are Java face recognition libraries open source?
Many Java face recognition libraries are open source. It allows us to access and change the source code based on their requirements.
4. Can I use these libraries for real-time face recognition?
Yes, some Java face recognition libraries support real-time face detection and recognition. It makes them suitable for applications like video surveillance or live authentication.
5. What are the key features when choosing a Java face recognition library?
Look for accuracy, speed, and ease of integration. It supports different platforms and the licensing model.
Data validation is a necessary step that allows for saving time and effort of a user when filling out forms on the web. Verify the field in two ways.
By using built-in HTML elements (which have limited custom validation capabilities) or by using JavaScript validation libraries. JavaScript libraries provide pre-coded packages, which support legacy browsers that do not have a built-in validation framework. One major advantage of using JavaScript libraries is that it takes the extra load of data verification and error return off from the server-side. This enhances user experience and smoothens out the form-filling process.
Listed below are some of the most popular form validation libraries based on JavaScript. The JSON-schema-validator is a code package that focuses on form field correctness and efficiency. AwesomeValidation is another JavaScript-based form validation library developed for use in Android, shrinking down validation to three steps only. Epubcheck is a code-package developed specifically for validation in e-book format files. Use these libraries to develop a flawless form on a web application.
android-saripaar
- Saripaar is a validation library for Android that allows you to add form validation.
- It provides a simple and extensible API for adding validation rules to your UI component.
- Saripaar uses annotations to define validation rules for your UI components.
json-schema-validator
- JSON Schema is a standard for defining JSON data structure.
- JSON is a process that ensures that JSON data complies with a specified schema.
- It's a Java implementation of the JSON Schema specification and provides features.
validator
- Validators are tools or components that ensure that data or input adheres to rules.
- JavaScript frameworks like Angular and React often have built-in forms.
- This can include data types, lengths, and constraints.
epubcheck
- EPUBCheck is a tool used to validate EPUB-Electronic Publication files.
- EPUB is a digital eBook format widely used for eBooks, digital magazines, and others.
- EPUBCheck can catch errors and issues that might affect the display or functionality.
AwesomeValidation
- AwesomeValidation is a validation library for Android that makes it easy to verify.
- It's designed to be easy to use and integrate into your Android projects.
- The library provides a variety of pre-defined validation rules and allows to create
simple-java-mail
- Simple Java Mail simplifies sending emails in Java applications.
- It provides a high-level API for composing and sending emails.
- This library aims to make email handling in Java straightforward to use.
VerticalStepperForm
- The VerticalStepperForm is a UI component used in Android development to install it.
- It allows users to progress through a series of steps, entering information or making it.
- This type of UI is commonly used in onboarding processes, setup wizards, or any scenario.
fluent-validator
- Fluent Validator is a Java library that provides a fluent interface for building.
- It makes validation code more expressive and readable by allowing it to chain.
governator
- Governator is a library for building and managing Java applications.
- The name Governator plays on the words Guice and governance.
- It supports dynamic configuration updates without requiring a restart.
json-schema
- JSON Schema is a specification for describing the structure of JSON data.
- It defines the elements that may appear in a JSON document and their relationships.
- It describes the expected structure and constraints of other JSON documents.
android-submit-credit-card-flow
- It creates a credit card submission flow in an Android app that involves collecting it.
- This usually includes fields for the card number, expiration date, and CVVs.
- This ensures to handle sensitive information securely on a server that complies.
kafka-spark-consumer
- This is a combination of Apache Kafka and Apache Spark. It is a popular architecture for processing and analyzing.
- Kafka acts as a distributed message broker, and Spark helps with stream processing
- This involves installing Kafka, starting a Kafka broker, and creating Kafka topics.
Masked-Edittext
- A Masked EditText is a specialized form of an EditText in Android that enforces a specific input.
- It's commonly used when you want to guide users in entering data in a certain way.
- There are various libraries available in the Android ecosystem that provide Masked EditText.
yavi
- Yavi focuses on providing a simple and expressive API for validating objects.
- Yavi is type-safe, which means it leverages Java's type system to catch it.
- This allows developers to create concise and readable validation code.
docs-archive
- docs-archive is a Java library used in User Interface, Form, and Xamarin applications.
- It has no vulnerabilities, and it has low support.
- It has a neutral sentiment in the developer community.
dss
- A Digital Signature Service (DSS) is a system or service that provides the capability.
- Digital signatures are cryptographic techniques used to verify authenticity and integrity.
- They ensure the security of electronic transactions and documents.
android-validation-komensky
- android-validation-komensky is a Java library typically used in Utilities Validation applications.
- It has no vulnerabilities and has a build file available.
- It has a Permissive License, and it has low support.
HtmlBuilder
- It's associated with a programming concept or library that helps in building HTML.
- HtmlBuilder is a Java library typically used in Mobile and Android applications.
- HtmlBuilder has no bugs or vulnerabilities.
Android-Validator
- Android-Validator is a library for Android development that provides functionality for validating input.
- This library simplifies adding validation to Android forms by providing it.
- The library allows you to create custom validation rules by implementing the Rules.
ParticlesDrawable
- ParticlesDrawable is an open-source library for Android that draws random flying particles.
- It has no vulnerabilities; it has built files available.
- ParticlesDrawable code analysis shows 0 unresolved vulnerabilities.
FormsFX
- FormsFX is a Java library for building forms in JavaFX applications.
- It simplifies the process of creating and handling forms by providing a set of utilities.
- The library supports data binding, allowing you to bind form components to data.
json-schema-validator
- JSON Schema Validator refers to a tool or library that validates JSON data against a JSON.
- JSON Schema is a standard defining the content, structure, and format of JSON form.
- It provides a way to describe the expected properties, their types, and constraints.
xssValidator
- XSS is a security vulnerability that occurs when an application allows untrusted input.
- To mitigate XSS attacks, input validation and proper output encoding are crucial.
- Ensure that input adheres to expected formats and does not contain malicious content.
android-json-form-wizard
- Android Material Json Form Wizard is a library for creating beautiful form-based wizards.
- Developed by Vijay Rawat, it is available on GitHub.
- The library creates form-based wizards with ease and speed, and it is based on the Material
rave
- RAVE is a Microsoft service that provides a platform for hosting and managing virtual events.
- Rave has no vulnerabilities and has built-in files available.
data-binding-validator
- Data Binding Validator is an Android library that provides a quick way of validation.
- The library offers a range of validation types, such as minimum/maximum length.
- data-binding-validator is a Java library typically used in Utilities and Validation applications.
android-card-form
- Android Card Form is a library that provides a ready-made card form layout used in an Android App.
- Developed by Braintree, it is available on GitHub.
- The library is open-source and free to use.
FAQ
1. What is Java form validation?
Java form validation ensures that the data entered meets the criteria. It helps maintain data integrity and improve the user experience by preventing invalid.
2. How does form validation work in Java applications?
Java form validation typically involves defining rules or constraints for each form field. Validation libraries provide annotations, APIs, or configuration options to express these rules. The validation framework checks the input against the defined rules and reports.
3. Can I use annotations for form validation in Java?
Yes, many Java form validation libraries, such as Hibernate Validator and Spring Validation. Annotations apply to fields or methods within Java beans to specify constraints. It required fields of maximum length or custom validation logic.
4. Are there any lightweight form validation libraries for Java?
Yes, there are lightweight validation libraries like Yavi. It aims to provide a simple and expressive API for validation without introducing. It focuses on being lightweight and efficient.
5. Are Java form validation libraries suitable for client-side validation?
Java form validation libraries primarily focus on server-side validation. For client-side validation, it may use JavaScript-based validation libraries. This is used in conjunction with server-side validation to provide a seamless.
Java libraries, by providing pre-coded packages of fundamental functionalities, reduce boilerplates in developing web applications.
This is particularly helpful when embedding video players and other media files into an application, giving viewers better control over the media displayed. Especially in the case of the latest open-source video player libraries, HTML5 coding support ensures error-free video playback on older browser versions. In addition, these libraries provide code to make video players compatible across various browsers. Video player libraries coded in Java enable efficient cache processing by using single cache lines, enabling quicker response times and increasing cache-hit instances. Code packs in these libraries can be used for YouTube videos, VLC Media Player, and many others.
Here is a list of the best 17 video player libraries based on Java. AndroidVideoCache is a smartly developed code package that supports efficient caching, enabling viewers an optimized streaming experience on the web. Caching straight to disk makes offline work possible. DKVideoPlayer is the second-ranker in the list developed specifically for Android-based platforms. MvpApp library provides video player code based on MVP architecture for Android-based applications. Phoenix is a unique library that provides code for recording video, taking pictures, selection of pictures or video, in addition to editing capabilities.
AndroidVideoCache
- AndroidVideoCache is a Java library used in telecommunications, media, entertainment, and servers.
- AndroidVideoCache library provides caching support and helps a single line of code.
- It allows caching to disk during streaming and offline work with cached resources.
DKVideoPlayer
- DKVideoPlayer is a library or tool related to video playback in Android.
- DKVideoplayer is an open-source Android video player that Encapsulates Media player, Exoplayer, etc.
- DKVideoPlayer has no bugs or vulnerabilities.
MvpApp
- The MVP pattern helps in Android development, organizing code that separates concerns.
- It represents the data and business logic of the application.
- It helps Represent the UI components and displays data to the user.
NiceVieoPlayer
- NicePlayer is a full-screen, borderless, multi-engine player designed for playing movies.
- It features full-screen or border-less floating windows and convenient controls for scrubbing.
- Nice Player is available on Linux, MAC, and Windows operating systems.
phoenix
- Phoenix is the name of a web development framework for Elixir programming.
- Elixir, a functional programming language, is built on the Erlang VM.
- Phoenix helps to make building scalable and maintainable web applications in Elixir.
VideoListPlayer
- It’s a Java library that allows you to load and play videos in a list view.
- It also supports automatic playback/pause while scrolling.
- VideoListPlayer has no vulnerabilities reported.
AndroidVideoPlayer
- AndroidVideoPlayer is a Java library typically used in Telecommunications, Media, etc.
- AndroidVideoPlayer has no bugs or vulnerabilities.
- AndroidVideoPlayer has a medium active ecosystem.
GiraffePlayer
- GiraffePlayer is an open-source project hosted on GitHub.
- It provides a simple and customizable video player for Android.
- GiraffePlayer supports a variety of video formats commonly used on the web.
360-video-player-for-android
- 360-video-player-for-android is a Java library used in Video, Video Utils, and Unity applications.
- 360-video-player-for-android has a Non-SPDX License.
Player
- It supports many formats and provides flexibility and extensibleness.
- Its popular open-source multimedia player is also available for Android.
- It supports a broad range of multimedia formats and has a user-friendly interface.
VRPlayer
- It allows playing all kinds of 4K videos without any trouble.
- It runs smoothly on iOS, Windows, and Android.
- It is compatible with numerous VR platforms such as Vive, Gear VR, Oculus, Cardboard, and many more.
ParsingPlayer
- This Player supports all stereo modes and has a recognition engine.
- It also has HD, Full HD, and 4K playback capabilities.
- It is compatible with numerous VR platforms such as Vive, Gear VR, Oculus, Cardboard, and many more.
GiraffePlayer2
- GiraffePlayer2 is a Java library typically used in Video and video Player applications.
- GiraffePlayer2 has a low active ecosystem.
- Its dependent libraries have no vulnerabilities reported.
YaPlayer
- It is an Android video player which supports MP4, AVI, WAV, and other formats.
- Its basis is on FFMpeg and VLC and can compile video encoding and decoding players.
- It has built files available, and it has low support.
ImmortalPlayer
- ImmortalPlayer is a Java library typically used in Media and Media Player applications.
- It has built files available, and it has low support.
- ImmortalPlayer releases are available to install and integrate.
RTSP.Player.Android
- Its basis is on the VXG Player SDK for Android and supports streaming protocols such as RTSP, RTP, UDP, etc.
- It has features like digital zoom, picture shifting, and thumbnails for live streaming.
- It also supports M3U channel lists and has easy stream list control.
alpha-movie
- alpha-movie is a Java library used in Video, Video Utils, and Unity applications.
- Alpha Movie is an Android video player library with alpha channel support.
- The Player encapsulates MediaPlayer and has its base functionality.
FAQ
1. What is a Java video player library?
A Java video player library is a set of tools, classes, and functions. Developers can use them to integrate video playback capabilities.
2. Why use a video player library in Java?
Video player libraries simplify the process of handling video playback in Java applications. They provide features such as codec support, streaming capabilities, and a user interface.
3. Can I use VLC as a video player in a Java application?
Yes, you can use VLC in a Java application through libraries like VLCJ. The VLCJ provides Java bindings for VLC, allowing you to embed VLC media players.
4. How do I handle different video formats in Java?
Video player libraries often come with built-in codec support for handling various videos. It Ensures that the chosen library supports the formats you intend to use.
5. Are there open-source Java video player libraries?
Yes, many Java video player libraries are open-source. It includes JavaFX Media, VLCJ, and Xuggler.
Cloud Computing is a tremendous technology that provides data sharing. Nowadays, most enterprises and individuals prefer to store their data in the cloud, and we can share our data in the cloud in a very efficient manner. Many schemes are proposed for secure data sharing in the cloud. Even though sharing sensitive data in the cloud is challenging, some of the libraries can help you share your data in the cloud in a much secure way.
Request Validation
Validator is used to validate the user's request .
Encryption
CryptoSwift, aes-js, symmetric-encryption are used to convert the file into encrypted format.
Send OTP
msg91-laravel , login-links are used to send OTP to an individual or group of people.
OTP Validation
yubikeyedup, yubikey-val are used to Verify OTP
An email has become an inevitable method of personal and business communications. Implementing Email API to applications make it fast, cheap, and accessible. Email helps firms as it provides efficient and effective ways to transmit all kinds of electronic data. Small, medium & large-scale businesses use web applications that require constant user inputs and outputs in product launch, manufacturing, customer outreach, and maintenance. Email plays a critical role in providing these inputs and outputs. Email API libraries are available to integrate and make this feature adapt to your web application. You can customize, integrate and implement Email API using reusable libraries.
Health care industries around the globe are growing day by day. Equally pharmacy industry is rising to the same extent. The pharmacy system stores data, systemizes, and controls the use of the medication process with the pharmacies. The pharmacy management system helps the pharmacist maintain their stock and choose the right medicine by using the computer program. The pharmacist makes use of this system to control the pharmacy reliably. Patients sometimes prefer to visit the pharmacy instead of a doctor for minor illnesses, and the system enables the pharmacist to prescribe over-the-counter drugs for these ailments.
Safety is a major issue all around the world. We are living in the fastest and growing digital world. We are yet to ensure safety for women. The crimes against women are increasing day by day. We should bring those crimes to an end, and they should be protected. In recent days more applications are developed based on voice recognition to protect women from harassment. Some of these libraries can help you build an application for this solution.
Streaming is the continuous transmission of data from a server to a client. These streaming data can be processed, stored, analyzed, and acted upon in real-time using stream processing technology. The common applications of streaming data process include IoT sensors, server logs etc. to find bugs/anomalies in real-time.
Anomaly Detection is the process of identification of suspicious/rare events by monitoring their significant difference from the standard behavioral pattern of data. In this solution, we identify anomaly in real-time streaming data by Machine Learning techniques.
The Streaming architecture and processing is handled by Kafka and Zookeeper.
A representative output of the execution of the Producer and consumer parts of files is provided below. The left pane is a command prompt which runs the producer file (which sends the data stream) and the right pane is a command prompt which runs the consumer file (which receives the data stream).
Libraries used in this solution
Streaming
Streaming libraries are essential for transmission of data in real-time.
Machine Learning
Machine learning libraries and frameworks here are helpful in providing state-of-the-art solutions using Machine learning.
Support
For any support, you can reach us at OpenWeaver Community Support
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.
Instructions to Run
- Locate and open the prompt.
- javac Main.java to create class file.
- java Main.java to run the java file
An ordered list of values is called a JSON array. It can store multiple values, strings, numbers, booleans, or objects in a JSON array. A comma must separate the values in the JSON array. A normal text file or stored data in column by column and split by a comma is called a CSV(comma-separated values).
Now will see the procedure to convert the JSON array to CSV,
- Read the data from the JSON file and store the result as a string.
- Construct a JSON object using the above string.
- Get the JSON Array from the JSON Object.
- Create a new CSV file using java. io. File.
- Deliver a comma-delimited text from the JSONArray of JSONObjects and write it to the newly created CSV file.
The JSON can be used as a 'data-interchange format' and it is 'lightweight' and 'language independent'. It can parse text from a string to produce vector-like objects. The advantage of using JSON for data storage, it is safe for transferring the data and suitable across platforms. To store the data comparatively JSON is preferred better than CSV In terms of scalability of application or file and while working with a large volume of data. The most common usage of JSON is used in JavaScript-based applications that have browser extensions and websites as a part of their features.
Here is an example of how you can convert JSON array to CSV in Java:
Fig 1: Preview of the output that you will get on running this code from your IDE
Code
Instructions
- Copy the code using the "Copy" button above, and paste it in a Java file in your IDE.
- Add the required dependencies and import them in java file.
- Run the file to generate the output csv file.
I hope you found this useful. I have added the link to dependent libraries, version information in the following sections.
I found this code snippet by searching for 'json array list to csv format' in kandi. You can try any such use case!
Environment Tested
I tested this solution in the following versions. Be mindful of changes when working with other versions.
- The solution is created in Java 11.0.17.
- The solution is tested on JSON Version:20210307 and apache.commons:commons-io:1.3.2.
Using this solution, we are able to convert an json array to csv with simple steps. This process also facilities an easy way to use, hassle-free method to create a hands-on working version of code which would help us to convert an json array to csv.
Dependent Libraries
You can add the dependent library in your gradle or maven files. you can get the dependancy xml in above link
You can search for any dependent library on kandi like apache commons io and json java
Support
- For any support on kandi solution kits, please use the chat
- For further learning resources, visit the Open Weaver Community learning page.
Trending Discussions on Java
How do purely functional languages handle index-based algorithms?
Java, Intellij IDEA problem Unrecognized option: --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
Springboot 2.6.0 / Spring fox 3 - Failed to start bean 'documentationPluginsBootstrapper'
Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)
Unable to load class AndroidComponentsExtension after upgrading the Android Gradle Plugin 7.1
Unable to find bundled Java version with flutter doctor, after updating Android studio Arctic Fox(2020.3.1) on M1 Apple Silicon
android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent, On AlarmPingSender
uploaded an APK which has an activity,activity alias,service or broadcast receiver with intentfilter, but without 'android : exported' property set
Log4j vulnerability - Is Log4j 1.2.17 vulnerable (was unable to find any JNDI code in source)?
QUESTION
How do purely functional languages handle index-based algorithms?
Asked 2022-Apr-05 at 12:51I have been trying to learn about functional programming, but I still struggle with thinking like a functional programmer. One such hangup is how one would implement index-heavy operations which rely strongly on loops/order-of-execution.
For example, consider the following Java code:
1public class Main {
2 public static void main(String[] args) {
3 List<Integer> nums = Arrays.asList(1,2,3,4,5,6,7,8,9);
4 System.out.println("Nums:\t"+ nums);
5 System.out.println("Prefix:\t"+prefixList(nums));
6 }
7
8 private static List<Integer> prefixList(List<Integer> nums){
9 List<Integer> prefix = new ArrayList<>(nums);
10 for(int i = 1; i < prefix.size(); ++i)
11 prefix.set(i, prefix.get(i) + prefix.get(i-1));
12 return prefix;
13 }
14}
15/*
16System.out:
17Nums: [1, 2, 3, 4, 5, 6, 7, 8, 9]
18Prefix: [1, 3, 6, 10, 15, 21, 28, 36, 45]
19*/
20
Here, in the prefixList
function, the nums list is first cloned, but then there is the iterative operation performed on it, where the value on index i relies on index i-1 (i.e. order of execution is required). Then this value is returned.
What would this look like in a functional language (Haskell, Lisp, etc.)? I have been learning about monads and think they may be relevant here, but my understanding is still not great.
ANSWER
Answered 2022-Mar-07 at 21:17This is not an index-heavy operation, in fact you can do this with a one-liner with scanl1 :: (a -> a -> a) -> [a] -> [a]
:
1public class Main {
2 public static void main(String[] args) {
3 List<Integer> nums = Arrays.asList(1,2,3,4,5,6,7,8,9);
4 System.out.println("Nums:\t"+ nums);
5 System.out.println("Prefix:\t"+prefixList(nums));
6 }
7
8 private static List<Integer> prefixList(List<Integer> nums){
9 List<Integer> prefix = new ArrayList<>(nums);
10 for(int i = 1; i < prefix.size(); ++i)
11 prefix.set(i, prefix.get(i) + prefix.get(i-1));
12 return prefix;
13 }
14}
15/*
16System.out:
17Nums: [1, 2, 3, 4, 5, 6, 7, 8, 9]
18Prefix: [1, 3, 6, 10, 15, 21, 28, 36, 45]
19*/
20prefixList = scanl1 (+)
21
indeed, for the list of Nums
, we get:
1public class Main {
2 public static void main(String[] args) {
3 List<Integer> nums = Arrays.asList(1,2,3,4,5,6,7,8,9);
4 System.out.println("Nums:\t"+ nums);
5 System.out.println("Prefix:\t"+prefixList(nums));
6 }
7
8 private static List<Integer> prefixList(List<Integer> nums){
9 List<Integer> prefix = new ArrayList<>(nums);
10 for(int i = 1; i < prefix.size(); ++i)
11 prefix.set(i, prefix.get(i) + prefix.get(i-1));
12 return prefix;
13 }
14}
15/*
16System.out:
17Nums: [1, 2, 3, 4, 5, 6, 7, 8, 9]
18Prefix: [1, 3, 6, 10, 15, 21, 28, 36, 45]
19*/
20prefixList = scanl1 (+)
21Prelude> prefixList [1 .. 9]
22[1,3,6,10,15,21,28,36,45]
23
scanl1
takes the first item of the original list as initial value for the accumulator, and yields that. Then each time it takes the accumulator and the next item of the given list, and sums these up as new accumulator, and yields the new accumulator value.
Often one does not need indexing, but enumerating over the list is sufficient. Imperative programming languages often work with for
loops with indexes, but in many cases these can be replaced by foreach
loops that thus do not take the index into account. In Haskell this also often helps to make algorithms more lazy.
If you really need random access lookups, you can work with data structures such as defined in the array
and vector
packages.
QUESTION
Java, Intellij IDEA problem Unrecognized option: --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
Asked 2022-Mar-26 at 15:23I have newly installed
1IntelliJ IDEA 2021.2 (Ultimate Edition)
2Build #IU-212.4746.92, built on July 27, 2021
3Licensed to XXXXXX
4Subscription is active until August 15, 2021.
5Runtime version: 11.0.11+9-b1504.13 amd64
6VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
7Linux 5.4.0-80-generic
8GC: G1 Young Generation, G1 Old Generation
9Memory: 2048M
10Cores: 3
11
12Kotlin: 212-1.5.10-release-IJ4746.92
13Current Desktop: X-Cinnamon
14
I cloned project I work with on other workstation without issues, but cannot start any class with main method and IDEA says:
1IntelliJ IDEA 2021.2 (Ultimate Edition)
2Build #IU-212.4746.92, built on July 27, 2021
3Licensed to XXXXXX
4Subscription is active until August 15, 2021.
5Runtime version: 11.0.11+9-b1504.13 amd64
6VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
7Linux 5.4.0-80-generic
8GC: G1 Young Generation, G1 Old Generation
9Memory: 2048M
10Cores: 3
11
12Kotlin: 212-1.5.10-release-IJ4746.92
13Current Desktop: X-Cinnamon
14Abnormal build process termination:
15/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx700m -Djava.awt.headless=true -Djava.endorsed.dirs=\"\" -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -Dio.netty.initialSeedUniquifier=-5972351880001011455 -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US -Didea.paths.selector=IntelliJIdea2021.2 -Didea.home.path=/home/pm/idea-IU-212.4746.92 -Didea.config.path=/home/pm/.config/JetBrains/IntelliJIdea2021.2 -Didea.plugins.path=/home/pm/.local/share/JetBrains/IntelliJIdea2021.2 -Djps.log.dir=/home/pm/.cache/JetBrains/IntelliJIdea2021.2/log/build-log -Djps.fallback.jdk.home=/home/pm/idea-IU-212.4746.92/jbr -Djps.fallback.jdk.version=11.0.11 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=/home/pm/.cache/JetBrains/IntelliJIdea2021.2/compile-server/rfg-survey-api_cc70fc05/_temp_ -Djps.backward.ref.index.builder=true -Djps.track.ap.dependencies=false --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -Dtmh.instrument.annotations=true -Dtmh.generate.line.numbers=true -Dkotlin.incremental.compilation=true -Dkotlin.incremental.compilation.js=true -Dkotlin.daemon.enabled -Dkotlin.daemon.client.alive.path=\"/tmp/kotlin-idea-12426594439704512301-is-running\" -classpath /home/pm/idea-IU-212.4746.92/plugins/java/lib/jps-launcher.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/lib/tools.jar org.jetbrains.jps.cmdline.Launcher /home/pm/idea-IU-212.4746.92/lib/slf4j.jar:/home/pm/idea-IU-212.4746.92/lib/idea_rt.jar:/home/pm/idea-IU-212.4746.92/lib/platform-api.jar:/home/pm/idea-IU-212.4746.92/plugins/java/lib/maven-resolver-transport-file-1.3.3.jar:/home/pm/idea-IU-212.4746.92/lib/forms_rt.jar:/home/pm/idea-IU-212.4746.92/lib/util.jar:/home/pm/idea-IU-212.4746.92/lib/annotations.jar:/home/pm/idea-IU-212.4746.92/lib/3rd-party.jar:/home/pm/idea-IU-212.4746.92/lib/kotlin-stdlib-jdk8.jar:/home/pm/idea-IU-212.4746.92/plugins/java/lib/maven-resolver-connector-basic-1.3.3.jar:/home/pm/idea-IU-212.4746.92/lib/jna-platform.jar:/home/pm/idea-IU-212.4746.92/lib/protobuf-java-3.15.8.jar:/home/pm/idea-IU-212.4746.92/plugins/java/lib/jps-builders-6.jar:/home/pm/idea-IU-212.4746.92/plugins/java/lib/javac2.jar:/home/pm/idea-IU-212.4746.92/plugins/java/lib/aether-dependency-resolver.jar:/home/pm/idea-IU-212.4746.92/plugins/java/lib/jps-builders.jar:/home/pm/idea-IU-212.4746.92/plugins/java/lib/jps-javac-extension-1.jar:/home/pm/idea-IU-212.4746.92/lib/jna.jar:/home/pm/idea-IU-212.4746.92/lib/jps-model.jar:/home/pm/idea-IU-212.4746.92/plugins/java/lib/maven-resolver-transport-http-1.3.3.jar:/home/pm/idea-IU-212.4746.92/plugins/JavaEE/lib/jasper-v2-rt.jar:/home/pm/idea-IU-212.4746.92/plugins/Kotlin/lib/kotlin-reflect.jar:/home/pm/idea-IU-212.4746.92/plugins/Kotlin/lib/kotlin-plugin.jar:/home/pm/idea-IU-212.4746.92/plugins/ant/lib/ant-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/uiDesigner/lib/jps/java-guiForms-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/eclipse/lib/eclipse-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/eclipse/lib/eclipse-common.jar:/home/pm/idea-IU-212.4746.92/plugins/IntelliLang/lib/java-langInjection-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/Groovy/lib/groovy-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/Groovy/lib/groovy-constants-rt.jar:/home/pm/idea-IU-212.4746.92/plugins/maven/lib/maven-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/gradle-java/lib/gradle-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/devkit/lib/devkit-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/javaFX/lib/javaFX-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/javaFX/lib/javaFX-common.jar:/home/pm/idea-IU-212.4746.92/plugins/JavaEE/lib/javaee-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/webSphereIntegration/lib/jps/javaee-appServers-websphere-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/weblogicIntegration/lib/jps/javaee-appServers-weblogic-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/JPA/lib/jps/javaee-jpa-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/Grails/lib/groovy-grails-jps.jar:/home/pm/idea-IU-212.4746.92/plugins/Grails/lib/groovy-grails-compilerPatch.jar:/home/pm/idea-IU-212.4746.92/plugins/Kotlin/lib/jps/kotlin-jps-plugin.jar:/home/pm/idea-IU-212.4746.92/plugins/Kotlin/lib/kotlin-jps-common.jar:/home/pm/idea-IU-212.4746.92/plugins/Kotlin/lib/kotlin-common.jar org.jetbrains.jps.cmdline.BuildMain 127.0.0.1 34781 9f0681bb-da2a-48db-8344-900ddeb29804 /home/pm/.cache/JetBrains/IntelliJIdea2021.2/compile-server
16Unrecognized option: --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
17Error: Could not create the Java Virtual Machine.
18Error: A fatal exception has occurred. Program will exit.
19
I found other comment to check Lombok works and I see it is fine.
How to fix the problem?
ANSWER
Answered 2021-Jul-28 at 07:22You are running the project via Java 1.8 and add the --add-opens
option to the runner. However Java 1.8 does not support it.
So, the first option is to use Java 11 to run the project, as Java 11 can recognize this VM option.
Another solution is to find a place where --add-opens
is added and remove it.
Check Run configuration in IntelliJ IDEA (VM options field) and Maven/Gradle configuration files for argLine
(Maven) and jvmArgs
(Gradle)
QUESTION
Springboot 2.6.0 / Spring fox 3 - Failed to start bean 'documentationPluginsBootstrapper'
Asked 2022-Mar-25 at 06:14I'm trying to initiate a Springboot project using Open Jdk 15, Springboot 2.6.0, Springfox 3. We are working on a project that replaced Netty as the webserver and used Jetty instead because we do not need a non-blocking environment.
In the code we depend primarily on Reactor API (Flux, Mono), so we can not remove org.springframework.boot:spring-boot-starter-webflux
dependencies.
I replicated the problem that we have in a new project.: https://github.com/jvacaq/spring-fox.
I figured out that these lines in our build.gradle file are the origin of the problem.
1compile("org.springframework.boot:spring-boot-starter-web") {
2 exclude module: "spring-boot-starter-tomcat"
3}
4compile("org.springframework.boot:spring-boot-starter-jetty")
5
Here is the build.gradle
file:
1compile("org.springframework.boot:spring-boot-starter-web") {
2 exclude module: "spring-boot-starter-tomcat"
3}
4compile("org.springframework.boot:spring-boot-starter-jetty")
5plugins {
6 id 'org.springframework.boot' version '2.6.0'
7 id 'io.spring.dependency-management' version '1.0.11.RELEASE'
8 id 'java'
9}
10
11group = 'com.example'
12version = '0.0.1-SNAPSHOT'
13sourceCompatibility = '11'
14
15repositories {
16 mavenCentral()
17}
18
19dependencies {
20 compile("org.springframework.boot:spring-boot-starter-web") {
21 exclude module: "spring-boot-starter-tomcat"
22 }
23 compile("org.springframework.boot:spring-boot-starter-jetty")
24 implementation 'org.springframework.boot:spring-boot-starter-webflux'
25 testImplementation 'org.springframework.boot:spring-boot-starter-test'
26 testImplementation 'io.projectreactor:reactor-test'
27 implementation "io.springfox:springfox-boot-starter:3.0.0"
28}
29
30test {
31 useJUnitPlatform()
32}
33
34
I issued the command gradle clean bootrun
. The result is this error:
1compile("org.springframework.boot:spring-boot-starter-web") {
2 exclude module: "spring-boot-starter-tomcat"
3}
4compile("org.springframework.boot:spring-boot-starter-jetty")
5plugins {
6 id 'org.springframework.boot' version '2.6.0'
7 id 'io.spring.dependency-management' version '1.0.11.RELEASE'
8 id 'java'
9}
10
11group = 'com.example'
12version = '0.0.1-SNAPSHOT'
13sourceCompatibility = '11'
14
15repositories {
16 mavenCentral()
17}
18
19dependencies {
20 compile("org.springframework.boot:spring-boot-starter-web") {
21 exclude module: "spring-boot-starter-tomcat"
22 }
23 compile("org.springframework.boot:spring-boot-starter-jetty")
24 implementation 'org.springframework.boot:spring-boot-starter-webflux'
25 testImplementation 'org.springframework.boot:spring-boot-starter-test'
26 testImplementation 'io.projectreactor:reactor-test'
27 implementation "io.springfox:springfox-boot-starter:3.0.0"
28}
29
30test {
31 useJUnitPlatform()
32}
33
34 gradle clean bootrun
35
36> Task :bootRun FAILED
37
38 . ____ _ __ _ _
39 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
40( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
41 \\/ ___)| |_)| | | | | || (_| | ) ) ) )
42 ' |____| .__|_| |_|_| |_\__, | / / / /
43 =========|_|==============|___/=/_/_/_/
44 :: Spring Boot :: (v2.6.0)
45
462021-11-19 09:41:06.665 INFO 16666 --- [ main] c.e.springfox.SpringFoxApplication : Starting SpringFoxApplication using Java 15.0.2 on advance-Inspiron-5379 with PID 16666 (/home/advance/projects/spring-fox/build/classes/java/main started by advance in /home/advance/projects/spring-fox)
472021-11-19 09:41:06.666 INFO 16666 --- [ main] c.e.springfox.SpringFoxApplication : No active profile set, falling back to default profiles: default
482021-11-19 09:41:07.294 INFO 16666 --- [ main] org.eclipse.jetty.util.log : Logging initialized @1132ms to org.eclipse.jetty.util.log.Slf4jLog
492021-11-19 09:41:07.396 INFO 16666 --- [ main] o.s.b.w.e.j.JettyServletWebServerFactory : Server initialized with port: 8080
502021-11-19 09:41:07.398 INFO 16666 --- [ main] org.eclipse.jetty.server.Server : jetty-9.4.44.v20210927; built: 2021-09-27T23:02:44.612Z; git: 8da83308eeca865e495e53ef315a249d63ba9332; jvm 15.0.2+7-27
512021-11-19 09:41:07.417 INFO 16666 --- [ main] o.e.j.s.h.ContextHandler.application : Initializing Spring embedded WebApplicationContext
522021-11-19 09:41:07.417 INFO 16666 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 713 ms
532021-11-19 09:41:07.474 INFO 16666 --- [ main] org.eclipse.jetty.server.session : DefaultSessionIdManager workerName=node0
542021-11-19 09:41:07.474 INFO 16666 --- [ main] org.eclipse.jetty.server.session : No SessionScavenger set, using defaults
552021-11-19 09:41:07.475 INFO 16666 --- [ main] org.eclipse.jetty.server.session : node0 Scavenging every 660000ms
562021-11-19 09:41:07.480 INFO 16666 --- [ main] o.e.jetty.server.handler.ContextHandler : Started o.s.b.w.e.j.JettyEmbeddedWebAppContext@6aa3bfc{application,/,[file:///tmp/jetty-docbase.8080.2024342829220941812/, jar:file:/home/advance/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-swagger-ui/3.0.0/1e665fbe22148f7c36fa8a08e515a0047cd4390b/springfox-swagger-ui-3.0.0.jar!/META-INF/resources],AVAILABLE}
572021-11-19 09:41:07.480 INFO 16666 --- [ main] org.eclipse.jetty.server.Server : Started @1318ms
582021-11-19 09:41:07.920 INFO 16666 --- [ main] o.e.j.s.h.ContextHandler.application : Initializing Spring DispatcherServlet 'dispatcherServlet'
592021-11-19 09:41:07.920 INFO 16666 --- [ main] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
602021-11-19 09:41:07.921 INFO 16666 --- [ main] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
612021-11-19 09:41:07.931 INFO 16666 --- [ main] o.e.jetty.server.AbstractConnector : Started ServerConnector@2643d762{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
622021-11-19 09:41:07.932 INFO 16666 --- [ main] o.s.b.web.embedded.jetty.JettyWebServer : Jetty started on port(s) 8080 (http/1.1) with context path '/'
632021-11-19 09:41:07.934 WARN 16666 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null
642021-11-19 09:41:07.949 INFO 16666 --- [ main] o.e.jetty.server.AbstractConnector : Stopped ServerConnector@2643d762{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
652021-11-19 09:41:07.950 INFO 16666 --- [ main] org.eclipse.jetty.server.session : node0 Stopped scavenging
662021-11-19 09:41:07.951 INFO 16666 --- [ main] o.e.j.s.h.ContextHandler.application : Destroying Spring FrameworkServlet 'dispatcherServlet'
672021-11-19 09:41:07.951 INFO 16666 --- [ main] o.e.jetty.server.handler.ContextHandler : Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@6aa3bfc{application,/,[file:///tmp/jetty-docbase.8080.2024342829220941812/, jar:file:/home/advance/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-swagger-ui/3.0.0/1e665fbe22148f7c36fa8a08e515a0047cd4390b/springfox-swagger-ui-3.0.0.jar!/META-INF/resources],STOPPED}
682021-11-19 09:41:07.958 INFO 16666 --- [ main] ConditionEvaluationReportLoggingListener :
69
70Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
712021-11-19 09:41:07.970 ERROR 16666 --- [ main] o.s.boot.SpringApplication : Application run failed
72
73org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null
74 at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.13.jar:5.3.13]
75 at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.13.jar:5.3.13]
76 at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.13.jar:5.3.13]
77 at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
78 at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.13.jar:5.3.13]
79 at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.13.jar:5.3.13]
80 at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935) ~[spring-context-5.3.13.jar:5.3.13]
81 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.13.jar:5.3.13]
82 at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.0.jar:2.6.0]
83 at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[spring-boot-2.6.0.jar:2.6.0]
84 at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) ~[spring-boot-2.6.0.jar:2.6.0]
85 at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) ~[spring-boot-2.6.0.jar:2.6.0]
86 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-2.6.0.jar:2.6.0]
87 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) ~[spring-boot-2.6.0.jar:2.6.0]
88 at com.example.springfox.SpringFoxApplication.main(SpringFoxApplication.java:10) ~[main/:na]
89Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null
90 at springfox.documentation.spring.web.WebMvcPatternsRequestConditionWrapper.getPatterns(WebMvcPatternsRequestConditionWrapper.java:56) ~[springfox-spring-webmvc-3.0.0.jar:3.0.0]
91 at springfox.documentation.RequestHandler.sortedPaths(RequestHandler.java:113) ~[springfox-core-3.0.0.jar:3.0.0]
92 at springfox.documentation.spi.service.contexts.Orderings.lambda$byPatternsCondition$3(Orderings.java:89) ~[springfox-spi-3.0.0.jar:3.0.0]
93 at java.base/java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469) ~[na:na]
94 at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) ~[na:na]
95 at java.base/java.util.TimSort.sort(TimSort.java:220) ~[na:na]
96 at java.base/java.util.Arrays.sort(Arrays.java:1306) ~[na:na]
97 at java.base/java.util.ArrayList.sort(ArrayList.java:1721) ~[na:na]
98 at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:392) ~[na:na]
99 at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[na:na]
100 at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[na:na]
101 at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[na:na]
102 at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[na:na]
103 at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[na:na]
104 at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[na:na]
105 at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[na:na]
106 at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
107 at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) ~[na:na]
108 at springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider.requestHandlers(WebMvcRequestHandlerProvider.java:81) ~[springfox-spring-webmvc-3.0.0.jar:3.0.0]
109 at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[na:na]
110 at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[na:na]
111 at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[na:na]
112 at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[na:na]
113 at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[na:na]
114 at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
115 at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) ~[na:na]
116 at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.withDefaults(AbstractDocumentationPluginsBootstrapper.java:107) ~[springfox-spring-web-3.0.0.jar:3.0.0]
117 at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.buildContext(AbstractDocumentationPluginsBootstrapper.java:91) ~[springfox-spring-web-3.0.0.jar:3.0.0]
118 at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.bootstrapDocumentationPlugins(AbstractDocumentationPluginsBootstrapper.java:82) ~[springfox-spring-web-3.0.0.jar:3.0.0]
119 at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start(DocumentationPluginsBootstrapper.java:100) ~[springfox-spring-web-3.0.0.jar:3.0.0]
120 at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-5.3.13.jar:5.3.13]
121 ... 14 common frames omitted
122
123
124FAILURE: Build failed with an exception.
125
126* What went wrong:
127Execution failed for task ':bootRun'.
128> Process 'command '/home/advance/.sdkman/candidates/java/15.0.2-open/bin/java'' finished with non-zero exit value 1
129
130* Try:
131Run 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.
132
133* Get more help at https://help.gradle.org
134
135Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
136Use '--warning-mode all' to show the individual deprecation warnings.
137See https://docs.gradle.org/6.9.1/userguide/command_line_interface.html#sec:command_line_warnings
138
139BUILD FAILED in 2s
1405 actionable tasks: 5 executed
141
Does anyone have an idea how to solve it?
ANSWER
Answered 2022-Feb-08 at 12:36This problem's caused by a bug in Springfox. It's making an assumption about how Spring MVC is set up that doesn't always hold true. Specifically, it's assuming that MVC's path matching will use the Ant-based path matcher and not the PathPattern-based matcher. PathPattern-based matching has been an option for some time now and is the default as of Spring Boot 2.6.
As described in Spring Boot 2.6's release notes, you can restore the configuration that Springfox assumes will be used by setting spring.mvc.pathmatch.matching-strategy
to ant-path-matcher
in your application.properties
file. Note that this will only work if you are not using Spring Boot's Actuator. The Actuator always uses PathPattern-based parsing, irrespective of the configured matching-strategy
. A change to Springfox will be required if you want to use it with the Actuator in Spring Boot 2.6 and later.
QUESTION
Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)
Asked 2022-Mar-17 at 15:50I've just updated my flutter project packages to be null-safety compliant and now Android Studio wants me to update my project to use the latest version of Kotling Gradle Plugin. Can't see where to change this though. I have tried to change "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
into "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10"
but this has no effect.
My build.grade
-file looks like this:
1def localProperties = new Properties()
2def localPropertiesFile = rootProject.file('local.properties')
3if (localPropertiesFile.exists()) {
4 localPropertiesFile.withReader('UTF-8') { reader ->
5 localProperties.load(reader)
6 }
7}
8
9def flutterRoot = localProperties.getProperty('flutter.sdk')
10if (flutterRoot == null) {
11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12}
13
14def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15if (flutterVersionCode == null) {
16 flutterVersionCode = '1'
17}
18
19def flutterVersionName = localProperties.getProperty('flutter.versionName')
20if (flutterVersionName == null) {
21 flutterVersionName = '1.0'
22}
23
24apply plugin: 'com.android.application'
25apply plugin: 'kotlin-android'
26apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27
28def keystoreProperties = new Properties()
29def keystorePropertiesFile = rootProject.file('key.properties')
30if (keystorePropertiesFile.exists()) {
31 keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32}
33
34android {
35 compileSdkVersion 31
36
37 sourceSets {
38 main.java.srcDirs += 'src/main/kotlin'
39 }
40
41 lintOptions {
42 disable 'InvalidPackage'
43 }
44
45 defaultConfig {
46 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 applicationId "*********"
48 minSdkVersion 30
49 targetSdkVersion 30
50 versionCode flutterVersionCode.toInteger()
51 versionName flutterVersionName
52 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
53 }
54
55
56
57 signingConfigs {
58 release {
59 keyAlias keystoreProperties['keyAlias']
60 keyPassword keystoreProperties['keyPassword']
61 storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
62 storePassword keystoreProperties['storePassword']
63 }
64 }
65 buildTypes {
66 release {
67 signingConfig signingConfigs.release
68 }
69 }
70
71}
72
73flutter {
74 source '../..'
75}
76
77dependencies {
78 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
79 testImplementation 'junit:junit:4.12'
80 androidTestImplementation 'androidx.test:runner:1.1.1'
81 androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
82 implementation 'com.google.firebase:firebase-analytics:17.2.2'
83}
84apply plugin: 'com.google.gms.google-services'
85
Build output:
1def localProperties = new Properties()
2def localPropertiesFile = rootProject.file('local.properties')
3if (localPropertiesFile.exists()) {
4 localPropertiesFile.withReader('UTF-8') { reader ->
5 localProperties.load(reader)
6 }
7}
8
9def flutterRoot = localProperties.getProperty('flutter.sdk')
10if (flutterRoot == null) {
11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12}
13
14def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15if (flutterVersionCode == null) {
16 flutterVersionCode = '1'
17}
18
19def flutterVersionName = localProperties.getProperty('flutter.versionName')
20if (flutterVersionName == null) {
21 flutterVersionName = '1.0'
22}
23
24apply plugin: 'com.android.application'
25apply plugin: 'kotlin-android'
26apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27
28def keystoreProperties = new Properties()
29def keystorePropertiesFile = rootProject.file('key.properties')
30if (keystorePropertiesFile.exists()) {
31 keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32}
33
34android {
35 compileSdkVersion 31
36
37 sourceSets {
38 main.java.srcDirs += 'src/main/kotlin'
39 }
40
41 lintOptions {
42 disable 'InvalidPackage'
43 }
44
45 defaultConfig {
46 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 applicationId "*********"
48 minSdkVersion 30
49 targetSdkVersion 30
50 versionCode flutterVersionCode.toInteger()
51 versionName flutterVersionName
52 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
53 }
54
55
56
57 signingConfigs {
58 release {
59 keyAlias keystoreProperties['keyAlias']
60 keyPassword keystoreProperties['keyPassword']
61 storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
62 storePassword keystoreProperties['storePassword']
63 }
64 }
65 buildTypes {
66 release {
67 signingConfig signingConfigs.release
68 }
69 }
70
71}
72
73flutter {
74 source '../..'
75}
76
77dependencies {
78 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
79 testImplementation 'junit:junit:4.12'
80 androidTestImplementation 'androidx.test:runner:1.1.1'
81 androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
82 implementation 'com.google.firebase:firebase-analytics:17.2.2'
83}
84apply plugin: 'com.google.gms.google-services'
85BUILD FAILED in 8s
86[!] Your project requires a newer version of the Kotlin Gradle plugin.
87 Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then update project/android/build.gradle:
88 ext.kotlin_version = '<latest-version>'
89Exception: Gradle task assembleDebug failed with exit code 1
90
ANSWER
Answered 2022-Jan-30 at 21:52change build gradle to this :
1def localProperties = new Properties()
2def localPropertiesFile = rootProject.file('local.properties')
3if (localPropertiesFile.exists()) {
4 localPropertiesFile.withReader('UTF-8') { reader ->
5 localProperties.load(reader)
6 }
7}
8
9def flutterRoot = localProperties.getProperty('flutter.sdk')
10if (flutterRoot == null) {
11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12}
13
14def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15if (flutterVersionCode == null) {
16 flutterVersionCode = '1'
17}
18
19def flutterVersionName = localProperties.getProperty('flutter.versionName')
20if (flutterVersionName == null) {
21 flutterVersionName = '1.0'
22}
23
24apply plugin: 'com.android.application'
25apply plugin: 'kotlin-android'
26apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27
28def keystoreProperties = new Properties()
29def keystorePropertiesFile = rootProject.file('key.properties')
30if (keystorePropertiesFile.exists()) {
31 keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32}
33
34android {
35 compileSdkVersion 31
36
37 sourceSets {
38 main.java.srcDirs += 'src/main/kotlin'
39 }
40
41 lintOptions {
42 disable 'InvalidPackage'
43 }
44
45 defaultConfig {
46 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 applicationId "*********"
48 minSdkVersion 30
49 targetSdkVersion 30
50 versionCode flutterVersionCode.toInteger()
51 versionName flutterVersionName
52 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
53 }
54
55
56
57 signingConfigs {
58 release {
59 keyAlias keystoreProperties['keyAlias']
60 keyPassword keystoreProperties['keyPassword']
61 storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
62 storePassword keystoreProperties['storePassword']
63 }
64 }
65 buildTypes {
66 release {
67 signingConfig signingConfigs.release
68 }
69 }
70
71}
72
73flutter {
74 source '../..'
75}
76
77dependencies {
78 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
79 testImplementation 'junit:junit:4.12'
80 androidTestImplementation 'androidx.test:runner:1.1.1'
81 androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
82 implementation 'com.google.firebase:firebase-analytics:17.2.2'
83}
84apply plugin: 'com.google.gms.google-services'
85BUILD FAILED in 8s
86[!] Your project requires a newer version of the Kotlin Gradle plugin.
87 Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then update project/android/build.gradle:
88 ext.kotlin_version = '<latest-version>'
89Exception: Gradle task assembleDebug failed with exit code 1
90classpath 'com.android.tools.build:gradle:4.1.0'
91
and gradle-wrapper to this :
1def localProperties = new Properties()
2def localPropertiesFile = rootProject.file('local.properties')
3if (localPropertiesFile.exists()) {
4 localPropertiesFile.withReader('UTF-8') { reader ->
5 localProperties.load(reader)
6 }
7}
8
9def flutterRoot = localProperties.getProperty('flutter.sdk')
10if (flutterRoot == null) {
11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12}
13
14def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15if (flutterVersionCode == null) {
16 flutterVersionCode = '1'
17}
18
19def flutterVersionName = localProperties.getProperty('flutter.versionName')
20if (flutterVersionName == null) {
21 flutterVersionName = '1.0'
22}
23
24apply plugin: 'com.android.application'
25apply plugin: 'kotlin-android'
26apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27
28def keystoreProperties = new Properties()
29def keystorePropertiesFile = rootProject.file('key.properties')
30if (keystorePropertiesFile.exists()) {
31 keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32}
33
34android {
35 compileSdkVersion 31
36
37 sourceSets {
38 main.java.srcDirs += 'src/main/kotlin'
39 }
40
41 lintOptions {
42 disable 'InvalidPackage'
43 }
44
45 defaultConfig {
46 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 applicationId "*********"
48 minSdkVersion 30
49 targetSdkVersion 30
50 versionCode flutterVersionCode.toInteger()
51 versionName flutterVersionName
52 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
53 }
54
55
56
57 signingConfigs {
58 release {
59 keyAlias keystoreProperties['keyAlias']
60 keyPassword keystoreProperties['keyPassword']
61 storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
62 storePassword keystoreProperties['storePassword']
63 }
64 }
65 buildTypes {
66 release {
67 signingConfig signingConfigs.release
68 }
69 }
70
71}
72
73flutter {
74 source '../..'
75}
76
77dependencies {
78 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
79 testImplementation 'junit:junit:4.12'
80 androidTestImplementation 'androidx.test:runner:1.1.1'
81 androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
82 implementation 'com.google.firebase:firebase-analytics:17.2.2'
83}
84apply plugin: 'com.google.gms.google-services'
85BUILD FAILED in 8s
86[!] Your project requires a newer version of the Kotlin Gradle plugin.
87 Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then update project/android/build.gradle:
88 ext.kotlin_version = '<latest-version>'
89Exception: Gradle task assembleDebug failed with exit code 1
90classpath 'com.android.tools.build:gradle:4.1.0'
91distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
92
QUESTION
Unable to load class AndroidComponentsExtension after upgrading the Android Gradle Plugin 7.1
Asked 2022-Mar-07 at 20:34I recently downloaded Android Studio Bumblebee and it helpfully asked whether I wanted to upgrade to Android Gradle Plugin 7.1.0, the version that shipped alongside Android Studio Bumblebee.
After upgrading, I get a build error:
1Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.
2
3This is an unexpected error. Please file a bug containing the idea.log file.
4
And looking at the idea.log
file, I see:
1Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.
2
3This is an unexpected error. Please file a bug containing the idea.log file.
4A problem occurred evaluating project ':main'.
5 at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:103)
6 ...
7Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':main'.
8 at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
9 ...
10Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
11 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
12 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
13 ...
14Caused by: java.lang.ClassNotFoundException: com.android.build.api.extension.AndroidComponentsExtension
15
Which means I can't run my app and I need to downgrade the AGP 7.0 to get things working again. How do I fix this and upgrade to Android Gradle Plugin 7.1.0?
ANSWER
Answered 2022-Feb-11 at 04:05Updating Navigation Safe Args
These lines are the important ones to look at:
1Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.
2
3This is an unexpected error. Please file a bug containing the idea.log file.
4A problem occurred evaluating project ':main'.
5 at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:103)
6 ...
7Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':main'.
8 at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
9 ...
10Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
11 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
12 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
13 ...
14Caused by: java.lang.ClassNotFoundException: com.android.build.api.extension.AndroidComponentsExtension
15Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
16 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
17 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
18
This indicates that the error is coming from the Navigation Safe Args plugin.
As per the Android Gradle Plugin 7.1.0 release notes:
AGP APIs that the Navigation Safe Args Gradle plugin depend on have been removed. AGP 7.1 does not work with Navigation Safe Args versions 2.4.0-rc1 or 2.4.0, but will work with versions 2.5.0-alpha01 and 2.4.1. In the meantime, as a workaround, you can use AGP 7.1 with a snapshot build of Navigation Safe Args, Navigation 2.5.0-SNAPSHOT. To use the snapshot build, follow the snapshot instructions with build id #8054565.
As Navigation 2.4.1 is now available, you can upgrade to that version of Navigation to gain the fix:
Backported from Navigation
2.5.0-alpha01
: Safe Args now depends on Android Gradle Plugin version 7.0.4. This means that Navigation Safe Args will no longer be compatible with Android Studio versions prior to 7.0, but is now compatible with Android Gradle Plugin 7.1.0 and higher.
1Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.
2
3This is an unexpected error. Please file a bug containing the idea.log file.
4A problem occurred evaluating project ':main'.
5 at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:103)
6 ...
7Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':main'.
8 at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
9 ...
10Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
11 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
12 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
13 ...
14Caused by: java.lang.ClassNotFoundException: com.android.build.api.extension.AndroidComponentsExtension
15Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
16 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
17 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
18dependencies {
19 classpath 'com.android.tools.build:gradle:7.1.0'
20
21 // Update this line to use 2.4.1
22 classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1"
23}
24
Note that you should always use the same version of the Navigation library as the Safe Args plugin (i.e., your app should also use Navigation 2.4.1): you should not try to use the Navigation 2.4.1+ Safe Args plugin with an earlier version of Navigation (such as 2.3.5).
Note on Firebase Perf Plugin
Note that you might see this same error when you are using:
1Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.
2
3This is an unexpected error. Please file a bug containing the idea.log file.
4A problem occurred evaluating project ':main'.
5 at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:103)
6 ...
7Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':main'.
8 at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
9 ...
10Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
11 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
12 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
13 ...
14Caused by: java.lang.ClassNotFoundException: com.android.build.api.extension.AndroidComponentsExtension
15Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
16 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
17 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
18dependencies {
19 classpath 'com.android.tools.build:gradle:7.1.0'
20
21 // Update this line to use 2.4.1
22 classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1"
23}
24classpath "com.google.firebase:perf-plugin:1.4.0"
25
With an idea.log
of that states:
1Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.
2
3This is an unexpected error. Please file a bug containing the idea.log file.
4A problem occurred evaluating project ':main'.
5 at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:103)
6 ...
7Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':main'.
8 at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
9 ...
10Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
11 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
12 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
13 ...
14Caused by: java.lang.ClassNotFoundException: com.android.build.api.extension.AndroidComponentsExtension
15Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
16 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
17 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
18dependencies {
19 classpath 'com.android.tools.build:gradle:7.1.0'
20
21 // Update this line to use 2.4.1
22 classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1"
23}
24classpath "com.google.firebase:perf-plugin:1.4.0"
25Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
26 at com.google.firebase.perf.plugin.FirebasePerfClassVisitorFactory.registerForProject(FirebasePerfClassVisitorFactory.java:54)
27 at com.google.firebase.perf.plugin.FirebasePerfPlugin.perform(FirebasePerfPlugin.java:145)
28 at com.google.firebase.perf.plugin.FirebasePerfPlugin.lambda$apply$0(FirebasePerfPlugin.java:107)
29
As per the Firebase Perf Plugin 1.4.1 Release Notes:
Migrated away from the deprecated Android Gradle plugin APIs.
So you should upgrade to 1.4.1:
1Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.
2
3This is an unexpected error. Please file a bug containing the idea.log file.
4A problem occurred evaluating project ':main'.
5 at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:103)
6 ...
7Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':main'.
8 at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
9 ...
10Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
11 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
12 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
13 ...
14Caused by: java.lang.ClassNotFoundException: com.android.build.api.extension.AndroidComponentsExtension
15Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
16 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:73)
17 at androidx.navigation.safeargs.gradle.SafeArgsPlugin.apply(SafeArgsPlugin.kt:42)
18dependencies {
19 classpath 'com.android.tools.build:gradle:7.1.0'
20
21 // Update this line to use 2.4.1
22 classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1"
23}
24classpath "com.google.firebase:perf-plugin:1.4.0"
25Caused by: java.lang.NoClassDefFoundError: com/android/build/api/extension/AndroidComponentsExtension
26 at com.google.firebase.perf.plugin.FirebasePerfClassVisitorFactory.registerForProject(FirebasePerfClassVisitorFactory.java:54)
27 at com.google.firebase.perf.plugin.FirebasePerfPlugin.perform(FirebasePerfPlugin.java:145)
28 at com.google.firebase.perf.plugin.FirebasePerfPlugin.lambda$apply$0(FirebasePerfPlugin.java:107)
29classpath "com.google.firebase:perf-plugin:1.4.1"
30
QUESTION
Unable to find bundled Java version with flutter doctor, after updating Android studio Arctic Fox(2020.3.1) on M1 Apple Silicon
Asked 2022-Feb-25 at 06:46I'm facing a weird issue. Before I updated my Android Studio, everything went fine in flutter doctor. Once I've updated Android Studio, when I run the doctor, it's showing "Unable to find bundled Java version". I've already downloaded Java installer and installed it on my M1 Mac, but after I restarted, running flutter doctor still shows the same error. The weird thing is, when I uninstall the Arctic Fox version and re-install the older Android Studio version, everything goes fine again when running the doctor. How can I resolve this?
ANSWER
Answered 2021-Jul-29 at 03:10COPY folder /Applications/Android Studio Preview.app/Contents/jre/Contents to /Applications/Android Studio Preview.app/Contents/jre/jdk/Contents
QUESTION
android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify
Asked 2022-Feb-23 at 14:13After upgrading to android 12, the application is not compiling. It shows
"Manifest merger failed with multiple errors, see logs"
Error showing in Merged manifest:
Merging Errors: Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for
android:exported
when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. main manifest (this file)
I have set all the activity with android:exported="false"
. But it is still showing this issue.
My manifest file:
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools"
4 package="eu.siacs.conversations">
5
6 <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
7
8 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10 <uses-permission android:name="android.permission.READ_CONTACTS" />
11 <uses-permission android:name="android.permission.READ_PROFILE" />
12 <uses-permission
13 android:name="android.permission.READ_PHONE_STATE"
14 android:maxSdkVersion="22" />
15 <uses-permission android:name="android.permission.INTERNET" />
16 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
17 <uses-permission android:name="android.permission.WAKE_LOCK" />
18 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
19 <uses-permission android:name="android.permission.VIBRATE" />
20 <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
21 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
22 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
23 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
24 <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
25 <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
26
27 <uses-feature
28 android:name="android.hardware.location"
29 android:required="false" />
30 <uses-feature
31 android:name="android.hardware.location.gps"
32 android:required="false" />
33 <uses-feature
34 android:name="android.hardware.location.network"
35 android:required="false" />
36
37 <uses-permission android:name="android.permission.CAMERA" />
38 <uses-permission android:name="android.permission.RECORD_AUDIO" />
39 <uses-permission android:name="android.permission.BLUETOOTH" />
40 <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
41 <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
42 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
43
44 <uses-feature
45 android:name="android.hardware.camera"
46 android:required="false" />
47 <uses-feature
48 android:name="android.hardware.camera.autofocus"
49 android:required="false" />
50 <uses-feature
51 android:name="android.hardware.microphone"
52 android:required="false" />
53
54 <application
55 android:name=".Application"
56 android:allowBackup="false"
57 android:allowClearUserData="true"
58 android:appCategory="social"
59 android:hardwareAccelerated="true"
60 android:icon="@mipmap/ic_app_launch"
61 android:label="@string/app_name"
62 android:largeHeap="true"
63 android:networkSecurityConfig="@xml/network_security_configuration"
64 android:requestLegacyExternalStorage="true"
65 android:roundIcon="@mipmap/ic_app_launch_round"
66 android:theme="@style/ConversationsTheme"
67 android:usesCleartextTraffic="true"
68 android:windowSoftInputMode="adjustPan|adjustResize"
69 tools:replace="android:label"
70 tools:targetApi="q">
71 <activity
72 android:name=".ui.search.GroupSearchActivity"
73 android:exported="true" />
74 <activity
75 android:name=".ui.profileUpdating.FavouritesActivity"
76 android:exported="true" />
77 <activity
78 android:name=".ui.profileUpdating.NameActivity"
79 android:exported="true" />
80 <activity
81 android:name=".ui.CompulsoryUpdateActivity"
82 android:exported="true" />
83 <activity android:name=".ui.payments.doPayment.DoPaymentActivity"
84 android:exported="true" />
85 <activity android:name=".ui.individualList.IndividualListActivity"
86 android:exported="true" />
87 <activity android:name=".ui.payments.setPayment.SetPaymentActivity"
88 android:exported="true" />
89 <activity android:name=".ui.login.otpActivity.OTPActivity"
90 android:exported="true" />
91 <activity android:name=".ui.login.loginActivity.LoginActivity"
92 android:exported="true" />
93
94 <service android:name=".services.XmppConnectionService" android:exported="true" />
95
96 <receiver android:name=".services.EventReceiver"
97 android:exported="true">
98 <intent-filter>
99 <action android:name="android.intent.action.BOOT_COMPLETED" />
100 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
101 <action android:name="android.intent.action.ACTION_SHUTDOWN" />
102 <action android:name="android.media.RINGER_MODE_CHANGED" />
103 </intent-filter>
104 </receiver>
105
106 <activity
107 android:name=".ui.ShareLocationActivity"
108 android:label="@string/title_activity_share_location"
109 android:exported="true"/>
110 <activity
111 android:name=".ui.SearchActivity"
112 android:label="@string/search_messages"
113 android:exported="true" />
114 <activity
115 android:name=".ui.RecordingActivity"
116 android:configChanges="orientation|screenSize"
117 android:theme="@style/ConversationsTheme.Dialog"
118 android:exported="true" />
119 <activity
120 android:name=".ui.ShowLocationActivity"
121 android:label="@string/title_activity_show_location"
122 android:exported="true" />
123 <activity
124 android:name=".ui.SplashActivity"
125 android:theme="@style/SplashTheme"
126 android:exported="true">
127 <intent-filter>
128 <action android:name="android.intent.action.MAIN" />
129
130 <category android:name="android.intent.category.LAUNCHER" />
131 </intent-filter>
132 </activity>
133 <activity
134 android:name=".ui.ConversationsActivity"
135 android:label="@string/app_name"
136 android:launchMode="singleTask"
137 android:minWidth="300dp"
138 android:minHeight="300dp"
139 android:exported="true"
140 android:windowSoftInputMode="stateHidden" />
141 <activity
142 android:name=".ui.ScanActivity"
143 android:screenOrientation="portrait"
144 android:exported="true"
145 android:theme="@style/ConversationsTheme.FullScreen"
146 android:windowSoftInputMode="stateAlwaysHidden" />
147 <activity
148 android:name=".ui.UriHandlerActivity"
149 android:label="@string/app_name"
150 android:exported="true">
151 <intent-filter>
152 <action android:name="android.intent.action.VIEW" />
153
154 <category android:name="android.intent.category.DEFAULT" />
155 <category android:name="android.intent.category.BROWSABLE" />
156
157 <data android:scheme="xmpp" />
158 </intent-filter>
159 <intent-filter android:autoVerify="true">
160 <action android:name="android.intent.action.VIEW" />
161
162 <category android:name="android.intent.category.DEFAULT" />
163 <category android:name="android.intent.category.BROWSABLE" />
164
165 <data android:scheme="https" />
166 <data android:host="im.app.in" />
167 <data android:pathPrefix="/i/" />
168 <data android:pathPrefix="/j/" />
169 </intent-filter>
170 <intent-filter>
171 <action android:name="android.intent.action.SENDTO" />
172
173 <category android:name="android.intent.category.DEFAULT" />
174
175 <data android:scheme="imto" />
176 <data android:host="jabber" />
177 </intent-filter>
178 </activity>
179 <activity
180 android:name=".ui.StartConversationActivity"
181 android:label="@string/title_activity_start_conversation"
182 android:launchMode="singleTop"
183 android:exported="true">
184 <intent-filter>
185 <action android:name="android.intent.action.VIEW" />
186 </intent-filter>
187 </activity>
188 <activity
189 android:name=".ui.SettingsActivity"
190 android:label="@string/title_activity_settings"
191 android:exported="true">
192 <intent-filter>
193 <action android:name="android.intent.action.MAIN" />
194
195 <category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
196 </intent-filter>
197 </activity>
198 <activity
199 android:name=".ui.ChooseContactActivity"
200 android:label="@string/title_activity_choose_contact"
201 android:exported="true" />
202 <activity
203 android:name=".ui.BlocklistActivity"
204 android:label="@string/title_activity_block_list"
205 android:exported="true"/>
206 <activity
207 android:name=".ui.ChangePasswordActivity"
208 android:label="@string/change_password_on_server"
209 android:exported="true"/>
210 <activity
211 android:name=".ui.ChooseAccountForProfilePictureActivity"
212 android:enabled="false"
213 android:label="@string/choose_account"
214 android:exported="true">
215 <intent-filter android:label="@string/set_profile_picture">
216 <action android:name="android.intent.action.ATTACH_DATA" />
217
218 <category android:name="android.intent.category.DEFAULT" />
219
220 <data android:mimeType="image/*" />
221 </intent-filter>
222 </activity>
223 <activity
224 android:name=".ui.ShareViaAccountActivity"
225 android:label="@string/title_activity_share_via_account"
226 android:launchMode="singleTop"
227 android:exported="true" />
228 <activity
229 android:name=".ui.EditAccountActivity"
230 android:launchMode="singleTop"
231 android:exported="true"
232 android:windowSoftInputMode="stateHidden|adjustResize" />
233 <activity
234 android:name=".ui.ConferenceDetailsActivity"
235 android:label="@string/action_muc_details"
236 android:exported="true"
237 android:windowSoftInputMode="stateHidden" />
238 <activity
239 android:name=".ui.ContactDetailsActivity"
240 android:exported="true"
241 android:windowSoftInputMode="stateHidden" />
242 <activity
243 android:name=".ui.PublishProfilePictureActivity"
244 android:label="@string/mgmt_account_publish_avatar"
245 android:exported="true"
246 android:windowSoftInputMode="stateHidden" />
247 <activity
248 android:name=".ui.PublishGroupChatProfilePictureActivity"
249 android:exported="true"
250 android:label="@string/group_chat_avatar" />
251 <activity
252 android:name=".ui.ShareWithActivity"
253 android:label="@string/app_name"
254 android:launchMode="singleTop"
255 android:exported="true">
256 <intent-filter>
257 <action android:name="android.intent.action.SEND" />
258 <action android:name="android.intent.action.SEND_MULTIPLE" />
259
260 <category android:name="android.intent.category.DEFAULT" />
261
262 <data android:mimeType="text/plain" />
263 </intent-filter>
264 <intent-filter>
265 <action android:name="android.intent.action.SEND" />
266 <action android:name="android.intent.action.SEND_MULTIPLE" />
267
268 <category android:name="android.intent.category.DEFAULT" />
269
270 <data android:mimeType="*/*" />
271 </intent-filter>
272
273 <!-- the value here needs to be the full class name; independent of the configured applicationId -->
274 <meta-data
275 android:name="android.service.chooser.chooser_target_service"
276 android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
277 </activity>
278 <activity
279 android:name=".ui.TrustKeysActivity"
280 android:label="@string/trust_omemo_fingerprints"
281 android:exported="true"
282 android:windowSoftInputMode="stateAlwaysHidden" />
283 <activity
284 android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
285 android:exported="true"
286 android:theme="@style/Base.Theme.AppCompat" />
287 <activity android:name=".ui.MemorizingActivity"
288 android:exported="true" />
289 <activity
290 android:name=".ui.MediaBrowserActivity"
291 android:exported="true"
292 android:label="@string/media_browser" />
293
294 <service android:name=".services.ExportBackupService" android:exported="true"/>
295 <service android:name=".services.ImportBackupService" android:exported="true"/>
296 <service
297 android:name=".services.ContactChooserTargetService"
298 android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
299 android:exported="true">
300 <intent-filter>
301 <action android:name="android.service.chooser.ChooserTargetService" />
302 </intent-filter>
303 </service>
304 <service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
305
306 <provider
307 android:name="androidx.core.content.FileProvider"
308 android:authorities="${applicationId}.files"
309 android:exported="false"
310 android:grantUriPermissions="true">
311 <meta-data
312 android:name="android.support.FILE_PROVIDER_PATHS"
313 android:resource="@xml/file_paths" />
314 </provider>
315 <provider
316 android:name=".services.BarcodeProvider"
317 android:authorities="${applicationId}.barcodes"
318 android:exported="false"
319 android:grantUriPermissions="true" />
320
321 <activity
322 android:name=".ui.ShortcutActivity"
323 android:label="@string/contact"
324 android:exported="true">
325 <intent-filter>
326 <action android:name="android.intent.action.CREATE_SHORTCUT" />
327 </intent-filter>
328 </activity>
329 <activity
330 android:name=".ui.MucUsersActivity"
331 android:exported="true"
332 android:label="@string/group_chat_members" />
333 <activity
334 android:name=".ui.ChannelDiscoveryActivity"
335 android:exported="true"
336 android:label="@string/discover_channels" />
337 <activity
338 android:name=".ui.RtpSessionActivity"
339 android:autoRemoveFromRecents="true"
340 android:exported="true"
341 android:launchMode="singleInstance"
342 android:supportsPictureInPicture="true" />
343 </application>
344
345</manifest>
346
My second manifest file:
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools"
4 package="eu.siacs.conversations">
5
6 <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
7
8 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10 <uses-permission android:name="android.permission.READ_CONTACTS" />
11 <uses-permission android:name="android.permission.READ_PROFILE" />
12 <uses-permission
13 android:name="android.permission.READ_PHONE_STATE"
14 android:maxSdkVersion="22" />
15 <uses-permission android:name="android.permission.INTERNET" />
16 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
17 <uses-permission android:name="android.permission.WAKE_LOCK" />
18 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
19 <uses-permission android:name="android.permission.VIBRATE" />
20 <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
21 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
22 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
23 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
24 <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
25 <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
26
27 <uses-feature
28 android:name="android.hardware.location"
29 android:required="false" />
30 <uses-feature
31 android:name="android.hardware.location.gps"
32 android:required="false" />
33 <uses-feature
34 android:name="android.hardware.location.network"
35 android:required="false" />
36
37 <uses-permission android:name="android.permission.CAMERA" />
38 <uses-permission android:name="android.permission.RECORD_AUDIO" />
39 <uses-permission android:name="android.permission.BLUETOOTH" />
40 <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
41 <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
42 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
43
44 <uses-feature
45 android:name="android.hardware.camera"
46 android:required="false" />
47 <uses-feature
48 android:name="android.hardware.camera.autofocus"
49 android:required="false" />
50 <uses-feature
51 android:name="android.hardware.microphone"
52 android:required="false" />
53
54 <application
55 android:name=".Application"
56 android:allowBackup="false"
57 android:allowClearUserData="true"
58 android:appCategory="social"
59 android:hardwareAccelerated="true"
60 android:icon="@mipmap/ic_app_launch"
61 android:label="@string/app_name"
62 android:largeHeap="true"
63 android:networkSecurityConfig="@xml/network_security_configuration"
64 android:requestLegacyExternalStorage="true"
65 android:roundIcon="@mipmap/ic_app_launch_round"
66 android:theme="@style/ConversationsTheme"
67 android:usesCleartextTraffic="true"
68 android:windowSoftInputMode="adjustPan|adjustResize"
69 tools:replace="android:label"
70 tools:targetApi="q">
71 <activity
72 android:name=".ui.search.GroupSearchActivity"
73 android:exported="true" />
74 <activity
75 android:name=".ui.profileUpdating.FavouritesActivity"
76 android:exported="true" />
77 <activity
78 android:name=".ui.profileUpdating.NameActivity"
79 android:exported="true" />
80 <activity
81 android:name=".ui.CompulsoryUpdateActivity"
82 android:exported="true" />
83 <activity android:name=".ui.payments.doPayment.DoPaymentActivity"
84 android:exported="true" />
85 <activity android:name=".ui.individualList.IndividualListActivity"
86 android:exported="true" />
87 <activity android:name=".ui.payments.setPayment.SetPaymentActivity"
88 android:exported="true" />
89 <activity android:name=".ui.login.otpActivity.OTPActivity"
90 android:exported="true" />
91 <activity android:name=".ui.login.loginActivity.LoginActivity"
92 android:exported="true" />
93
94 <service android:name=".services.XmppConnectionService" android:exported="true" />
95
96 <receiver android:name=".services.EventReceiver"
97 android:exported="true">
98 <intent-filter>
99 <action android:name="android.intent.action.BOOT_COMPLETED" />
100 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
101 <action android:name="android.intent.action.ACTION_SHUTDOWN" />
102 <action android:name="android.media.RINGER_MODE_CHANGED" />
103 </intent-filter>
104 </receiver>
105
106 <activity
107 android:name=".ui.ShareLocationActivity"
108 android:label="@string/title_activity_share_location"
109 android:exported="true"/>
110 <activity
111 android:name=".ui.SearchActivity"
112 android:label="@string/search_messages"
113 android:exported="true" />
114 <activity
115 android:name=".ui.RecordingActivity"
116 android:configChanges="orientation|screenSize"
117 android:theme="@style/ConversationsTheme.Dialog"
118 android:exported="true" />
119 <activity
120 android:name=".ui.ShowLocationActivity"
121 android:label="@string/title_activity_show_location"
122 android:exported="true" />
123 <activity
124 android:name=".ui.SplashActivity"
125 android:theme="@style/SplashTheme"
126 android:exported="true">
127 <intent-filter>
128 <action android:name="android.intent.action.MAIN" />
129
130 <category android:name="android.intent.category.LAUNCHER" />
131 </intent-filter>
132 </activity>
133 <activity
134 android:name=".ui.ConversationsActivity"
135 android:label="@string/app_name"
136 android:launchMode="singleTask"
137 android:minWidth="300dp"
138 android:minHeight="300dp"
139 android:exported="true"
140 android:windowSoftInputMode="stateHidden" />
141 <activity
142 android:name=".ui.ScanActivity"
143 android:screenOrientation="portrait"
144 android:exported="true"
145 android:theme="@style/ConversationsTheme.FullScreen"
146 android:windowSoftInputMode="stateAlwaysHidden" />
147 <activity
148 android:name=".ui.UriHandlerActivity"
149 android:label="@string/app_name"
150 android:exported="true">
151 <intent-filter>
152 <action android:name="android.intent.action.VIEW" />
153
154 <category android:name="android.intent.category.DEFAULT" />
155 <category android:name="android.intent.category.BROWSABLE" />
156
157 <data android:scheme="xmpp" />
158 </intent-filter>
159 <intent-filter android:autoVerify="true">
160 <action android:name="android.intent.action.VIEW" />
161
162 <category android:name="android.intent.category.DEFAULT" />
163 <category android:name="android.intent.category.BROWSABLE" />
164
165 <data android:scheme="https" />
166 <data android:host="im.app.in" />
167 <data android:pathPrefix="/i/" />
168 <data android:pathPrefix="/j/" />
169 </intent-filter>
170 <intent-filter>
171 <action android:name="android.intent.action.SENDTO" />
172
173 <category android:name="android.intent.category.DEFAULT" />
174
175 <data android:scheme="imto" />
176 <data android:host="jabber" />
177 </intent-filter>
178 </activity>
179 <activity
180 android:name=".ui.StartConversationActivity"
181 android:label="@string/title_activity_start_conversation"
182 android:launchMode="singleTop"
183 android:exported="true">
184 <intent-filter>
185 <action android:name="android.intent.action.VIEW" />
186 </intent-filter>
187 </activity>
188 <activity
189 android:name=".ui.SettingsActivity"
190 android:label="@string/title_activity_settings"
191 android:exported="true">
192 <intent-filter>
193 <action android:name="android.intent.action.MAIN" />
194
195 <category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
196 </intent-filter>
197 </activity>
198 <activity
199 android:name=".ui.ChooseContactActivity"
200 android:label="@string/title_activity_choose_contact"
201 android:exported="true" />
202 <activity
203 android:name=".ui.BlocklistActivity"
204 android:label="@string/title_activity_block_list"
205 android:exported="true"/>
206 <activity
207 android:name=".ui.ChangePasswordActivity"
208 android:label="@string/change_password_on_server"
209 android:exported="true"/>
210 <activity
211 android:name=".ui.ChooseAccountForProfilePictureActivity"
212 android:enabled="false"
213 android:label="@string/choose_account"
214 android:exported="true">
215 <intent-filter android:label="@string/set_profile_picture">
216 <action android:name="android.intent.action.ATTACH_DATA" />
217
218 <category android:name="android.intent.category.DEFAULT" />
219
220 <data android:mimeType="image/*" />
221 </intent-filter>
222 </activity>
223 <activity
224 android:name=".ui.ShareViaAccountActivity"
225 android:label="@string/title_activity_share_via_account"
226 android:launchMode="singleTop"
227 android:exported="true" />
228 <activity
229 android:name=".ui.EditAccountActivity"
230 android:launchMode="singleTop"
231 android:exported="true"
232 android:windowSoftInputMode="stateHidden|adjustResize" />
233 <activity
234 android:name=".ui.ConferenceDetailsActivity"
235 android:label="@string/action_muc_details"
236 android:exported="true"
237 android:windowSoftInputMode="stateHidden" />
238 <activity
239 android:name=".ui.ContactDetailsActivity"
240 android:exported="true"
241 android:windowSoftInputMode="stateHidden" />
242 <activity
243 android:name=".ui.PublishProfilePictureActivity"
244 android:label="@string/mgmt_account_publish_avatar"
245 android:exported="true"
246 android:windowSoftInputMode="stateHidden" />
247 <activity
248 android:name=".ui.PublishGroupChatProfilePictureActivity"
249 android:exported="true"
250 android:label="@string/group_chat_avatar" />
251 <activity
252 android:name=".ui.ShareWithActivity"
253 android:label="@string/app_name"
254 android:launchMode="singleTop"
255 android:exported="true">
256 <intent-filter>
257 <action android:name="android.intent.action.SEND" />
258 <action android:name="android.intent.action.SEND_MULTIPLE" />
259
260 <category android:name="android.intent.category.DEFAULT" />
261
262 <data android:mimeType="text/plain" />
263 </intent-filter>
264 <intent-filter>
265 <action android:name="android.intent.action.SEND" />
266 <action android:name="android.intent.action.SEND_MULTIPLE" />
267
268 <category android:name="android.intent.category.DEFAULT" />
269
270 <data android:mimeType="*/*" />
271 </intent-filter>
272
273 <!-- the value here needs to be the full class name; independent of the configured applicationId -->
274 <meta-data
275 android:name="android.service.chooser.chooser_target_service"
276 android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
277 </activity>
278 <activity
279 android:name=".ui.TrustKeysActivity"
280 android:label="@string/trust_omemo_fingerprints"
281 android:exported="true"
282 android:windowSoftInputMode="stateAlwaysHidden" />
283 <activity
284 android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
285 android:exported="true"
286 android:theme="@style/Base.Theme.AppCompat" />
287 <activity android:name=".ui.MemorizingActivity"
288 android:exported="true" />
289 <activity
290 android:name=".ui.MediaBrowserActivity"
291 android:exported="true"
292 android:label="@string/media_browser" />
293
294 <service android:name=".services.ExportBackupService" android:exported="true"/>
295 <service android:name=".services.ImportBackupService" android:exported="true"/>
296 <service
297 android:name=".services.ContactChooserTargetService"
298 android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
299 android:exported="true">
300 <intent-filter>
301 <action android:name="android.service.chooser.ChooserTargetService" />
302 </intent-filter>
303 </service>
304 <service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
305
306 <provider
307 android:name="androidx.core.content.FileProvider"
308 android:authorities="${applicationId}.files"
309 android:exported="false"
310 android:grantUriPermissions="true">
311 <meta-data
312 android:name="android.support.FILE_PROVIDER_PATHS"
313 android:resource="@xml/file_paths" />
314 </provider>
315 <provider
316 android:name=".services.BarcodeProvider"
317 android:authorities="${applicationId}.barcodes"
318 android:exported="false"
319 android:grantUriPermissions="true" />
320
321 <activity
322 android:name=".ui.ShortcutActivity"
323 android:label="@string/contact"
324 android:exported="true">
325 <intent-filter>
326 <action android:name="android.intent.action.CREATE_SHORTCUT" />
327 </intent-filter>
328 </activity>
329 <activity
330 android:name=".ui.MucUsersActivity"
331 android:exported="true"
332 android:label="@string/group_chat_members" />
333 <activity
334 android:name=".ui.ChannelDiscoveryActivity"
335 android:exported="true"
336 android:label="@string/discover_channels" />
337 <activity
338 android:name=".ui.RtpSessionActivity"
339 android:autoRemoveFromRecents="true"
340 android:exported="true"
341 android:launchMode="singleInstance"
342 android:supportsPictureInPicture="true" />
343 </application>
344
345</manifest>
346<?xml version="1.0" encoding="utf-8"?>
347<manifest xmlns:android="http://schemas.android.com/apk/res/android"
348 xmlns:tools="http://schemas.android.com/tools"
349 package="eu.siacs.conversations">
350
351 <application tools:ignore="GoogleAppIndexingWarning">
352 <activity
353 android:name=".ui.ManageAccountActivity"
354 android:label="@string/title_activity_manage_accounts"
355 android:launchMode="singleTask"
356 android:exported="true"/>
357 <activity
358 android:name=".ui.MagicCreateActivity"
359 android:label="@string/create_new_account"
360 android:launchMode="singleTask"
361 android:exported="true"/>
362 <activity
363 android:name=".ui.EasyOnboardingInviteActivity"
364 android:label="@string/invite_to_app"
365 android:launchMode="singleTask" />
366 <activity
367 android:name=".ui.ImportBackupActivity"
368 android:label="@string/restore_backup"
369 android:launchMode="singleTask"
370 android:exported="true">
371 <intent-filter>
372 <action android:name="android.intent.action.VIEW" />
373 <category android:name="android.intent.category.DEFAULT" />
374
375 <data android:mimeType="application/vnd.conversations.backup" />
376 <data android:scheme="content" />
377 </intent-filter>
378 <intent-filter>
379 <action android:name="android.intent.action.VIEW" />
380 <category android:name="android.intent.category.DEFAULT" />
381
382 <data android:mimeType="application/vnd.conversations.backup" />
383 <data android:scheme="file" />
384 </intent-filter>
385 <intent-filter>
386 <action android:name="android.intent.action.VIEW" />
387
388 <category android:name="android.intent.category.DEFAULT" />
389 <category android:name="android.intent.category.BROWSABLE" />
390
391 <data android:scheme="content" />
392 <data android:host="*" />
393 <data android:mimeType="*/*" />
394 <data android:pathPattern=".*\\.ceb" />
395 <data android:pathPattern=".*\\..*\\.ceb" />
396 <data android:pathPattern=".*\\..*\\..*\\.ceb" />
397 <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
398 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
399 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
400 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
401 </intent-filter>
402 <intent-filter>
403 <action android:name="android.intent.action.VIEW" />
404
405 <category android:name="android.intent.category.DEFAULT" />
406 <category android:name="android.intent.category.BROWSABLE" />
407
408 <data android:scheme="file" />
409 <data android:host="*" />
410 <data android:mimeType="*/*" />
411 <data android:pathPattern=".*\\.ceb" />
412 <data android:pathPattern=".*\\..*\\.ceb" />
413 <data android:pathPattern=".*\\..*\\..*\\.ceb" />
414 <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
415 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
416 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
417 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
418 </intent-filter>
419 </activity>
420 </application>
421</manifest>
422
423
My gradle file:
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools"
4 package="eu.siacs.conversations">
5
6 <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
7
8 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10 <uses-permission android:name="android.permission.READ_CONTACTS" />
11 <uses-permission android:name="android.permission.READ_PROFILE" />
12 <uses-permission
13 android:name="android.permission.READ_PHONE_STATE"
14 android:maxSdkVersion="22" />
15 <uses-permission android:name="android.permission.INTERNET" />
16 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
17 <uses-permission android:name="android.permission.WAKE_LOCK" />
18 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
19 <uses-permission android:name="android.permission.VIBRATE" />
20 <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
21 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
22 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
23 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
24 <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
25 <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
26
27 <uses-feature
28 android:name="android.hardware.location"
29 android:required="false" />
30 <uses-feature
31 android:name="android.hardware.location.gps"
32 android:required="false" />
33 <uses-feature
34 android:name="android.hardware.location.network"
35 android:required="false" />
36
37 <uses-permission android:name="android.permission.CAMERA" />
38 <uses-permission android:name="android.permission.RECORD_AUDIO" />
39 <uses-permission android:name="android.permission.BLUETOOTH" />
40 <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
41 <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
42 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
43
44 <uses-feature
45 android:name="android.hardware.camera"
46 android:required="false" />
47 <uses-feature
48 android:name="android.hardware.camera.autofocus"
49 android:required="false" />
50 <uses-feature
51 android:name="android.hardware.microphone"
52 android:required="false" />
53
54 <application
55 android:name=".Application"
56 android:allowBackup="false"
57 android:allowClearUserData="true"
58 android:appCategory="social"
59 android:hardwareAccelerated="true"
60 android:icon="@mipmap/ic_app_launch"
61 android:label="@string/app_name"
62 android:largeHeap="true"
63 android:networkSecurityConfig="@xml/network_security_configuration"
64 android:requestLegacyExternalStorage="true"
65 android:roundIcon="@mipmap/ic_app_launch_round"
66 android:theme="@style/ConversationsTheme"
67 android:usesCleartextTraffic="true"
68 android:windowSoftInputMode="adjustPan|adjustResize"
69 tools:replace="android:label"
70 tools:targetApi="q">
71 <activity
72 android:name=".ui.search.GroupSearchActivity"
73 android:exported="true" />
74 <activity
75 android:name=".ui.profileUpdating.FavouritesActivity"
76 android:exported="true" />
77 <activity
78 android:name=".ui.profileUpdating.NameActivity"
79 android:exported="true" />
80 <activity
81 android:name=".ui.CompulsoryUpdateActivity"
82 android:exported="true" />
83 <activity android:name=".ui.payments.doPayment.DoPaymentActivity"
84 android:exported="true" />
85 <activity android:name=".ui.individualList.IndividualListActivity"
86 android:exported="true" />
87 <activity android:name=".ui.payments.setPayment.SetPaymentActivity"
88 android:exported="true" />
89 <activity android:name=".ui.login.otpActivity.OTPActivity"
90 android:exported="true" />
91 <activity android:name=".ui.login.loginActivity.LoginActivity"
92 android:exported="true" />
93
94 <service android:name=".services.XmppConnectionService" android:exported="true" />
95
96 <receiver android:name=".services.EventReceiver"
97 android:exported="true">
98 <intent-filter>
99 <action android:name="android.intent.action.BOOT_COMPLETED" />
100 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
101 <action android:name="android.intent.action.ACTION_SHUTDOWN" />
102 <action android:name="android.media.RINGER_MODE_CHANGED" />
103 </intent-filter>
104 </receiver>
105
106 <activity
107 android:name=".ui.ShareLocationActivity"
108 android:label="@string/title_activity_share_location"
109 android:exported="true"/>
110 <activity
111 android:name=".ui.SearchActivity"
112 android:label="@string/search_messages"
113 android:exported="true" />
114 <activity
115 android:name=".ui.RecordingActivity"
116 android:configChanges="orientation|screenSize"
117 android:theme="@style/ConversationsTheme.Dialog"
118 android:exported="true" />
119 <activity
120 android:name=".ui.ShowLocationActivity"
121 android:label="@string/title_activity_show_location"
122 android:exported="true" />
123 <activity
124 android:name=".ui.SplashActivity"
125 android:theme="@style/SplashTheme"
126 android:exported="true">
127 <intent-filter>
128 <action android:name="android.intent.action.MAIN" />
129
130 <category android:name="android.intent.category.LAUNCHER" />
131 </intent-filter>
132 </activity>
133 <activity
134 android:name=".ui.ConversationsActivity"
135 android:label="@string/app_name"
136 android:launchMode="singleTask"
137 android:minWidth="300dp"
138 android:minHeight="300dp"
139 android:exported="true"
140 android:windowSoftInputMode="stateHidden" />
141 <activity
142 android:name=".ui.ScanActivity"
143 android:screenOrientation="portrait"
144 android:exported="true"
145 android:theme="@style/ConversationsTheme.FullScreen"
146 android:windowSoftInputMode="stateAlwaysHidden" />
147 <activity
148 android:name=".ui.UriHandlerActivity"
149 android:label="@string/app_name"
150 android:exported="true">
151 <intent-filter>
152 <action android:name="android.intent.action.VIEW" />
153
154 <category android:name="android.intent.category.DEFAULT" />
155 <category android:name="android.intent.category.BROWSABLE" />
156
157 <data android:scheme="xmpp" />
158 </intent-filter>
159 <intent-filter android:autoVerify="true">
160 <action android:name="android.intent.action.VIEW" />
161
162 <category android:name="android.intent.category.DEFAULT" />
163 <category android:name="android.intent.category.BROWSABLE" />
164
165 <data android:scheme="https" />
166 <data android:host="im.app.in" />
167 <data android:pathPrefix="/i/" />
168 <data android:pathPrefix="/j/" />
169 </intent-filter>
170 <intent-filter>
171 <action android:name="android.intent.action.SENDTO" />
172
173 <category android:name="android.intent.category.DEFAULT" />
174
175 <data android:scheme="imto" />
176 <data android:host="jabber" />
177 </intent-filter>
178 </activity>
179 <activity
180 android:name=".ui.StartConversationActivity"
181 android:label="@string/title_activity_start_conversation"
182 android:launchMode="singleTop"
183 android:exported="true">
184 <intent-filter>
185 <action android:name="android.intent.action.VIEW" />
186 </intent-filter>
187 </activity>
188 <activity
189 android:name=".ui.SettingsActivity"
190 android:label="@string/title_activity_settings"
191 android:exported="true">
192 <intent-filter>
193 <action android:name="android.intent.action.MAIN" />
194
195 <category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
196 </intent-filter>
197 </activity>
198 <activity
199 android:name=".ui.ChooseContactActivity"
200 android:label="@string/title_activity_choose_contact"
201 android:exported="true" />
202 <activity
203 android:name=".ui.BlocklistActivity"
204 android:label="@string/title_activity_block_list"
205 android:exported="true"/>
206 <activity
207 android:name=".ui.ChangePasswordActivity"
208 android:label="@string/change_password_on_server"
209 android:exported="true"/>
210 <activity
211 android:name=".ui.ChooseAccountForProfilePictureActivity"
212 android:enabled="false"
213 android:label="@string/choose_account"
214 android:exported="true">
215 <intent-filter android:label="@string/set_profile_picture">
216 <action android:name="android.intent.action.ATTACH_DATA" />
217
218 <category android:name="android.intent.category.DEFAULT" />
219
220 <data android:mimeType="image/*" />
221 </intent-filter>
222 </activity>
223 <activity
224 android:name=".ui.ShareViaAccountActivity"
225 android:label="@string/title_activity_share_via_account"
226 android:launchMode="singleTop"
227 android:exported="true" />
228 <activity
229 android:name=".ui.EditAccountActivity"
230 android:launchMode="singleTop"
231 android:exported="true"
232 android:windowSoftInputMode="stateHidden|adjustResize" />
233 <activity
234 android:name=".ui.ConferenceDetailsActivity"
235 android:label="@string/action_muc_details"
236 android:exported="true"
237 android:windowSoftInputMode="stateHidden" />
238 <activity
239 android:name=".ui.ContactDetailsActivity"
240 android:exported="true"
241 android:windowSoftInputMode="stateHidden" />
242 <activity
243 android:name=".ui.PublishProfilePictureActivity"
244 android:label="@string/mgmt_account_publish_avatar"
245 android:exported="true"
246 android:windowSoftInputMode="stateHidden" />
247 <activity
248 android:name=".ui.PublishGroupChatProfilePictureActivity"
249 android:exported="true"
250 android:label="@string/group_chat_avatar" />
251 <activity
252 android:name=".ui.ShareWithActivity"
253 android:label="@string/app_name"
254 android:launchMode="singleTop"
255 android:exported="true">
256 <intent-filter>
257 <action android:name="android.intent.action.SEND" />
258 <action android:name="android.intent.action.SEND_MULTIPLE" />
259
260 <category android:name="android.intent.category.DEFAULT" />
261
262 <data android:mimeType="text/plain" />
263 </intent-filter>
264 <intent-filter>
265 <action android:name="android.intent.action.SEND" />
266 <action android:name="android.intent.action.SEND_MULTIPLE" />
267
268 <category android:name="android.intent.category.DEFAULT" />
269
270 <data android:mimeType="*/*" />
271 </intent-filter>
272
273 <!-- the value here needs to be the full class name; independent of the configured applicationId -->
274 <meta-data
275 android:name="android.service.chooser.chooser_target_service"
276 android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
277 </activity>
278 <activity
279 android:name=".ui.TrustKeysActivity"
280 android:label="@string/trust_omemo_fingerprints"
281 android:exported="true"
282 android:windowSoftInputMode="stateAlwaysHidden" />
283 <activity
284 android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
285 android:exported="true"
286 android:theme="@style/Base.Theme.AppCompat" />
287 <activity android:name=".ui.MemorizingActivity"
288 android:exported="true" />
289 <activity
290 android:name=".ui.MediaBrowserActivity"
291 android:exported="true"
292 android:label="@string/media_browser" />
293
294 <service android:name=".services.ExportBackupService" android:exported="true"/>
295 <service android:name=".services.ImportBackupService" android:exported="true"/>
296 <service
297 android:name=".services.ContactChooserTargetService"
298 android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
299 android:exported="true">
300 <intent-filter>
301 <action android:name="android.service.chooser.ChooserTargetService" />
302 </intent-filter>
303 </service>
304 <service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
305
306 <provider
307 android:name="androidx.core.content.FileProvider"
308 android:authorities="${applicationId}.files"
309 android:exported="false"
310 android:grantUriPermissions="true">
311 <meta-data
312 android:name="android.support.FILE_PROVIDER_PATHS"
313 android:resource="@xml/file_paths" />
314 </provider>
315 <provider
316 android:name=".services.BarcodeProvider"
317 android:authorities="${applicationId}.barcodes"
318 android:exported="false"
319 android:grantUriPermissions="true" />
320
321 <activity
322 android:name=".ui.ShortcutActivity"
323 android:label="@string/contact"
324 android:exported="true">
325 <intent-filter>
326 <action android:name="android.intent.action.CREATE_SHORTCUT" />
327 </intent-filter>
328 </activity>
329 <activity
330 android:name=".ui.MucUsersActivity"
331 android:exported="true"
332 android:label="@string/group_chat_members" />
333 <activity
334 android:name=".ui.ChannelDiscoveryActivity"
335 android:exported="true"
336 android:label="@string/discover_channels" />
337 <activity
338 android:name=".ui.RtpSessionActivity"
339 android:autoRemoveFromRecents="true"
340 android:exported="true"
341 android:launchMode="singleInstance"
342 android:supportsPictureInPicture="true" />
343 </application>
344
345</manifest>
346<?xml version="1.0" encoding="utf-8"?>
347<manifest xmlns:android="http://schemas.android.com/apk/res/android"
348 xmlns:tools="http://schemas.android.com/tools"
349 package="eu.siacs.conversations">
350
351 <application tools:ignore="GoogleAppIndexingWarning">
352 <activity
353 android:name=".ui.ManageAccountActivity"
354 android:label="@string/title_activity_manage_accounts"
355 android:launchMode="singleTask"
356 android:exported="true"/>
357 <activity
358 android:name=".ui.MagicCreateActivity"
359 android:label="@string/create_new_account"
360 android:launchMode="singleTask"
361 android:exported="true"/>
362 <activity
363 android:name=".ui.EasyOnboardingInviteActivity"
364 android:label="@string/invite_to_app"
365 android:launchMode="singleTask" />
366 <activity
367 android:name=".ui.ImportBackupActivity"
368 android:label="@string/restore_backup"
369 android:launchMode="singleTask"
370 android:exported="true">
371 <intent-filter>
372 <action android:name="android.intent.action.VIEW" />
373 <category android:name="android.intent.category.DEFAULT" />
374
375 <data android:mimeType="application/vnd.conversations.backup" />
376 <data android:scheme="content" />
377 </intent-filter>
378 <intent-filter>
379 <action android:name="android.intent.action.VIEW" />
380 <category android:name="android.intent.category.DEFAULT" />
381
382 <data android:mimeType="application/vnd.conversations.backup" />
383 <data android:scheme="file" />
384 </intent-filter>
385 <intent-filter>
386 <action android:name="android.intent.action.VIEW" />
387
388 <category android:name="android.intent.category.DEFAULT" />
389 <category android:name="android.intent.category.BROWSABLE" />
390
391 <data android:scheme="content" />
392 <data android:host="*" />
393 <data android:mimeType="*/*" />
394 <data android:pathPattern=".*\\.ceb" />
395 <data android:pathPattern=".*\\..*\\.ceb" />
396 <data android:pathPattern=".*\\..*\\..*\\.ceb" />
397 <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
398 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
399 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
400 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
401 </intent-filter>
402 <intent-filter>
403 <action android:name="android.intent.action.VIEW" />
404
405 <category android:name="android.intent.category.DEFAULT" />
406 <category android:name="android.intent.category.BROWSABLE" />
407
408 <data android:scheme="file" />
409 <data android:host="*" />
410 <data android:mimeType="*/*" />
411 <data android:pathPattern=".*\\.ceb" />
412 <data android:pathPattern=".*\\..*\\.ceb" />
413 <data android:pathPattern=".*\\..*\\..*\\.ceb" />
414 <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
415 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
416 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
417 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
418 </intent-filter>
419 </activity>
420 </application>
421</manifest>
422
423import com.android.build.OutputFile
424
425// Top-level build file where you can add configuration options common to all
426// sub-projects/modules.
427buildscript {
428 ext.kotlin_version = "1.5.21"
429 repositories {
430 google()
431 mavenCentral()
432 maven { url 'https://jitpack.io' }
433 gradlePluginPortal()
434 }
435 dependencies {
436 classpath 'com.android.tools.build:gradle:4.2.2'
437 classpath 'com.google.gms:google-services:4.3.8'
438 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
439 }
440}
441
442apply plugin: 'com.android.application'
443apply plugin: 'kotlin-android'
444apply plugin: 'kotlin-kapt'
445apply plugin: 'com.google.gms.google-services'
446
447repositories {
448 google()
449 mavenCentral()
450 jcenter()
451 maven { url 'https://jitpack.io' }
452}
453
454configurations {
455 conversationsFreeCompatImplementation
456}
457
458dependencies {
459 implementation 'androidx.viewpager:viewpager:1.0.0'
460 implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
461
462 implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
463
464 implementation 'org.sufficientlysecure:openpgp-api:10.0'
465 implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
466 implementation 'androidx.appcompat:appcompat:1.3.1'
467 implementation 'androidx.exifinterface:exifinterface:1.3.2'
468 implementation 'androidx.cardview:cardview:1.0.0'
469 implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
470 implementation 'androidx.emoji:emoji:1.1.0'
471 implementation 'com.google.android.material:material:1.4.0'
472 conversationsFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.1.0'
473 implementation 'org.bouncycastle:bcmail-jdk15on:1.64'
474 //zxing stopped supporting Java 7 so we have to stick with 3.3.3
475 //https://github.com/zxing/zxing/issues/1170
476 implementation 'com.google.zxing:core:3.4.1'
477 implementation 'de.measite.minidns:minidns-hla:0.2.4'
478 implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
479 implementation 'org.whispersystems:signal-protocol-java:2.8.1'
480 implementation 'com.makeramen:roundedimageview:2.3.0'
481 implementation "com.wefika:flowlayout:0.4.1"
482 implementation 'net.ypresto.androidtranscoder:android-transcoder:0.3.0'
483 implementation 'org.jxmpp:jxmpp-jid:1.0.1'
484 implementation 'org.osmdroid:osmdroid-android:6.1.10'
485 implementation 'org.hsluv:hsluv:0.2'
486 implementation 'org.conscrypt:conscrypt-android:2.5.2'
487 implementation 'me.drakeet.support:toastcompat:1.1.0'
488 implementation "com.leinardi.android:speed-dial:3.2.0"
489
490 implementation "com.squareup.retrofit2:retrofit:2.9.0"
491 implementation "com.squareup.retrofit2:converter-gson:2.9.0"
492 implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.2"
493 implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2'
494
495 implementation 'com.google.guava:guava:30.1.1-android'
496 implementation 'org.webrtc:google-webrtc:1.0.32006'
497
498 // Lifecycle Helper
499 implementation "androidx.activity:activity-ktx:1.3.0-rc02"
500 implementation "androidx.fragment:fragment-ktx:1.3.6"
501
502 //Navigation
503 implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
504 implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
505
506 //CardView
507 implementation "androidx.cardview:cardview:1.0.0"
508
509 //Country Code Picker
510 implementation 'com.hbb20:ccp:2.5.3'
511
512 //Firebase
513 implementation 'com.google.firebase:firebase-bom:28.3.0'
514 implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
515 implementation 'androidx.browser:browser:1.3.0'
516
517 //OTP view
518 implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.1.2'
519
520 //Retrofit
521 implementation 'com.squareup.retrofit2:retrofit:2.9.0'
522 implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
523
524 //Gson
525 implementation 'com.google.code.gson:gson:2.8.7'
526
527 //Multidex
528 implementation 'androidx.multidex:multidex:2.0.1'
529
530 //Round Image
531 implementation 'de.hdodenhof:circleimageview:3.1.0'
532
533 // Button with image and text
534 implementation 'com.github.Omega-R:OmegaCenterIconButton:0.0.4@aar'
535
536 //Razor pay
537 implementation 'com.razorpay:checkout:1.6.10'
538
539 //Mixpanel Tracking
540 implementation 'com.mixpanel.android:mixpanel-android:5.9.1'
541
542 //Loading screen
543 implementation 'com.wang.avi:library:2.1.3'
544
545 //Loading
546 implementation 'com.wang.avi:library:2.1.3'
547
548 //Form
549 implementation 'com.quickbirdstudios:surveykit:1.1.0'
550}
551
552ext {
553 travisBuild = System.getenv("TRAVIS") == "true"
554 preDexEnabled = System.getProperty("pre-dex", "true")
555 abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
556}
557
558android {
559 compileSdkVersion 31
560
561 defaultConfig {
562 minSdkVersion 24
563 targetSdkVersion 31
564 versionCode 44
565 versionName "2.0.4"
566 multiDexEnabled = true
567 archivesBaseName += "-$versionName"
568 applicationId "com.app.app"
569 resValue "string", "applicationId", applicationId
570 def appName = "app"
571 resValue "string", "app_name", appName
572 buildConfigField "String", "APP_NAME", "\"$appName\""
573 }
574
575 splits {
576 abi {
577 universalApk true
578 enable true
579 }
580 }
581
582 configurations {
583 compile.exclude group: 'org.jetbrains' , module:'annotations'
584 }
585
586 dataBinding {
587 enabled true
588 }
589
590 dexOptions {
591 // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
592 preDexLibraries = preDexEnabled && !travisBuild
593 jumboMode true
594 }
595
596 compileOptions {
597 sourceCompatibility JavaVersion.VERSION_1_8
598 targetCompatibility JavaVersion.VERSION_1_8
599 }
600
601 flavorDimensions("mode", "distribution", "emoji")
602
603 productFlavors {
604
605 conversations {
606 dimension "mode"
607 }
608 free {
609 dimension "distribution"
610 versionNameSuffix "+f"
611 }
612 compat {
613 dimension "emoji"
614 versionNameSuffix "c"
615 }
616 }
617
618 sourceSets {
619 conversationsFreeCompat {
620 java {
621 srcDir 'src/freeCompat/java'
622 srcDir 'src/conversationsFree/java'
623 }
624 }
625 }
626
627 buildTypes {
628 release {
629 shrinkResources true
630 minifyEnabled true
631 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
632 versionNameSuffix "r"
633 }
634 debug {
635 shrinkResources true
636 minifyEnabled true
637 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
638 versionNameSuffix "d"
639 }
640 }
641
642
643 if (new File("signing.properties").exists()) {
644 Properties props = new Properties()
645 props.load(new FileInputStream(file("signing.properties")))
646
647 signingConfigs {
648 release {
649 storeFile file(props['keystore'])
650 storePassword props['keystore.password']
651 keyAlias props['keystore.alias']
652 keyPassword props['keystore.password']
653 }
654 }
655 buildTypes.release.signingConfig = signingConfigs.release
656 }
657
658 lintOptions {
659 disable 'MissingTranslation', 'InvalidPackage','AppCompatResource'
660 }
661
662 subprojects {
663
664 afterEvaluate {
665 if (getPlugins().hasPlugin('android') ||
666 getPlugins().hasPlugin('android-library')) {
667
668 configure(android.lintOptions) {
669 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
670 }
671 }
672
673 }
674 }
675
676 packagingOptions {
677 exclude 'META-INF/BCKEY.DSA'
678 exclude 'META-INF/BCKEY.SF'
679 }
680
681 android.applicationVariants.all { variant ->
682 variant.outputs.each { output ->
683 def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
684 if (baseAbiVersionCode != null) {
685 output.versionCodeOverride = (100 * variant.versionCode) + baseAbiVersionCode
686 }
687 }
688
689 }
690}
691
ANSWER
Answered 2021-Aug-04 at 09:18I'm not sure what you're using to code, but in order to set it in Android Studio, open the manifest of your project and under the "activity" section, put android:exported="true"(or false if that is what you prefer). I have attached an example.
QUESTION
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent, On AlarmPingSender
Asked 2022-Feb-20 at 16:06Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. I got it after updating target SDK to 31. the error always come after AlarmPingSender. But i dont know any class that used AlarmPingSender.
1
22021-10-31 10:43:04.990 17031-17341/com.app.mobile D/AlarmPingSender: Register alarmreceiver to MqttServiceMqttService.pingSender.com.app.mobile-2e24ccbde048f2e91635651784
32021-10-31 10:43:04.993 17031-17341/com.app.mobile E/AndroidRuntime: FATAL EXCEPTION: MQTT Rec: com.app.mobile-2e24ccbde048f2e91635651784
4 Process: com.app.mobile, PID: 17031
5 java.lang.IllegalArgumentException: com.app.mobile: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
6 Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
7 at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
8 at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
9 at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
10 at org.eclipse.paho.android.service.AlarmPingSender.start(AlarmPingSender.java:76)
11 at org.eclipse.paho.client.mqttv3.internal.ClientState.connected(ClientState.java:1150)
12 at org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:987)
13 at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:118)
14 at java.lang.Thread.run(Thread.java:920)
15
16
- Upgrade WorkManager to 2.7.0
- set AllProject to force use WorkManager to 2.7.0
- change all existing PendingIntent to use FLAG_IMMUTABLE
- there's old code that still use gcm and disable it
- Updating all Firebase package (some said its because of later version of analytics)
- OneSignal
- Qiscus
- Firebase
- WorkManager
ANSWER
Answered 2021-Oct-31 at 07:02Possible solution
Upgrade google analytics to firebase analaytics. Hope it'll solve your problems.Also upgrade all the library what're you using.
For me below solutions solve the problem.
Add PendingIntent.FLAG_IMMUTABLE
to your pending intents.
Here is an example -
PendingIntent pendingIntent = PendingIntent.getActivity(this, alarmID, notificationIntent, PendingIntent.FLAG_IMMUTABLE);
For further information follow this link - https://developer.android.com/reference/android/app/PendingIntent#FLAG_IMMUTABLE
QUESTION
uploaded an APK which has an activity,activity alias,service or broadcast receiver with intentfilter, but without 'android : exported' property set
Asked 2022-Feb-03 at 10:56I'm having an issue when i'm uploading app bundle to the play console that You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. but my manifest file includes the property.
Manifest file
1 <?xml version="1.0" encoding="utf-8"?>
2 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 package="**********">
4 <!-- io.flutter.app.FlutterApplication is an android.app.Application that
5 calls FlutterMain.startInitialization(this); in its onCreate method.
6 In most cases you can leave this as-is, but you if you want to provide
7 additional functionality it is fine to subclass or reimplement
8 FlutterApplication and put your custom class here. -->
9 <uses-permission android:name="android.permission.INTERNET" />
10 <uses-permission android:name="android.permission.CAMERA" />
11 <uses-feature android:name="android.hardware.camera" />
12 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
13 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
14 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
15 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
16 <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
17 <uses-permission android:name="android.permission.WAKE_LOCK"/>
18 <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
19 <uses-permission android:name="android.permission.VIBRATE" />
20 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
21 <uses-permission android:name="android.permission.WAKE_LOCK" />
22 <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
23 <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
24
25
26 <application
27 android:name="io.flutter.app.FlutterApplication"
28 android:label="*****"
29 android:requestLegacyExternalStorage="true"
30 android:usesCleartextTraffic="true"
31 android:icon="@mipmap/ic_launcher">
32
33
34 <meta-data
35 android:name="com.google.firebase.messaging.default_notification_icon"
36 android:resource="@drawable/ic_stat_artboard_1" />
37
38 <meta-data android:name="com.google.android.geo.API_KEY"
39 android:value="Z*********"/>
40
41 <provider
42 android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
43 android:authorities="im.mingguang.mingguang_app.flutter_downloader.provider"
44 android:grantUriPermissions="true"
45 android:requestLegacyExternalStorage="true">
46 <meta-data
47 android:name="android.support.FILE_PROVIDER_PATHS"
48 android:resource="@xml/provider_paths"/>
49 </provider>
50
51 <provider
52 android:name="androidx.core.content.FileProvider"
53 android:authorities="${applicationId}.provider"
54 android:grantUriPermissions="true">
55 <meta-data
56 android:name="android.support.FILE_PROVIDER_PATHS"
57 android:resource="@xml/provider_paths"/>
58 </provider>
59 <activity
60 android:name=".MainActivity"
61 android:launchMode="singleTop"
62 android:theme="@style/LaunchTheme"
63 android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
64 android:hardwareAccelerated="true"
65 android:exported="true"
66 android:windowSoftInputMode="adjustResize">
67 <intent-filter>
68 <action android:name="android.intent.action.MAIN"/>
69 <category android:name="android.intent.category.DEFAULT"/>
70 <category android:name="android.intent.category.LAUNCHER"/>
71 </intent-filter>
72 <intent-filter>
73 <action android:name="FLUTTER_NOTIFICATION_CLICK" />
74 <category android:name="android.intent.category.DEFAULT"/>
75 </intent-filter>
76 </activity>
77 <!-- Don't delete the meta-data below.
78 This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
79 <meta-data
80 android:name="flutterEmbedding"
81 android:value="2" />
82 </application>
83 </manifest>
84
Play Console Error
ANSWER
Answered 2022-Jan-12 at 23:56I face the same Issue but i solved by writing android:exported="true" in activity bellow the android:name=".MainActivity" image shown
QUESTION
Log4j vulnerability - Is Log4j 1.2.17 vulnerable (was unable to find any JNDI code in source)?
Asked 2022-Feb-01 at 15:47With regard to the Log4j JNDI remote code execution vulnerability that has been identified CVE-2021-44228 - (also see references) - I wondered if Log4j-v1.2 is also impacted, but the closest I got from source code review is the JMS-Appender.
The question is, while the posts on the Internet indicate that Log4j 1.2 is also vulnerable, I am not able to find the relevant source code for it.
Am I missing something that others have identified?
Log4j 1.2 appears to have a vulnerability in the socket-server class, but my understanding is that it needs to be enabled in the first place for it to be applicable and hence is not a passive threat unlike the JNDI-lookup vulnerability which the one identified appears to be.
Is my understanding - that Log4j v1.2 - is not vulnerable to the jndi-remote-code execution bug correct?
ReferencesThis blog post from Cloudflare also indicates the same point as from AKX....that it was introduced from Log4j 2!
Update #1 - A fork of the (now-retired) apache-log4j-1.2.x with patch fixes for few vulnerabilities identified in the older library is now available (from the original log4j author). The site is https://reload4j.qos.ch/. As of 21-Jan-2022 version 1.2.18.2 has been released. Vulnerabilities addressed to date include those pertaining to JMSAppender, SocketServer and Chainsaw vulnerabilities. Note that I am simply relaying this information. Have not verified the fixes from my end. Please refer the link for additional details.
ANSWER
Answered 2022-Jan-01 at 18:43The JNDI feature was added into Log4j 2.0-beta9.
Log4j 1.x thus does not have the vulnerable code.
Community Discussions contain sources that include Stack Exchange Network