Top Related Projects
A powerful Android Dynamic Component Framework.
A powerful and lightweight plugin framework for Android
Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
A hotfix library for Android platform, and not just this...
🔥 xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.
Quick Overview
Small is an Android plugin framework that allows developers to build plugins as standalone Android apps. It enables dynamic loading and hot deployment of plugins, facilitating modular app development and reducing the main app's size. Small aims to simplify the process of building large-scale Android applications.
Pros
- Supports dynamic loading and hot deployment of plugins
- Reduces main app size by modularizing features into plugins
- Allows plugins to be developed and tested as standalone apps
- Provides a seamless integration experience for users
Cons
- May introduce complexity in app architecture and development process
- Potential performance overhead due to dynamic loading
- Limited documentation and community support compared to more mainstream solutions
- Requires careful management of plugin versions and compatibility
Code Examples
- Initializing Small in your main app:
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Small.preSetUp(this);
}
}
- Defining a plugin in the
build.gradle
file:
apply plugin: 'com.android.application'
apply plugin: 'net.wequick.small'
small {
buildToAssets = true
}
- Launching a plugin activity:
Small.openUri("main", getContext());
- Accessing resources from the host app in a plugin:
int resId = Small.getHostResourceId("drawable", "ic_launcher", getPackageName());
Drawable drawable = getResources().getDrawable(resId);
Getting Started
- Add Small to your project's
build.gradle
:
buildscript {
dependencies {
classpath 'net.wequick.tools.build:gradle-small:1.5.0-beta6'
}
}
apply plugin: 'net.wequick.small'
- Configure Small in your app module's
build.gradle
:
small {
buildToAssets = true
baseResourcePackageName = "com.example.myapp"
}
- Initialize Small in your
Application
class:
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Small.preSetUp(this);
}
}
- Set up your plugin modules and start developing!
Competitor Comparisons
A powerful Android Dynamic Component Framework.
Pros of Atlas
- More comprehensive solution for large-scale Android app development
- Better support for dynamic component management and hot fixes
- Stronger focus on performance optimization and resource isolation
Cons of Atlas
- Steeper learning curve due to its complexity
- Requires more setup and configuration compared to Small
- May be overkill for smaller projects or simpler app architectures
Code Comparison
Atlas:
Atlas.getInstance().installBundle(bundleFile);
Bundle bundle = Atlas.getInstance().getBundle(bundleName);
bundle.start();
Small:
Small.setBaseUri("file:///android_asset/bundle-");
Small.setUp(this);
Small.openUri("main", this);
Key Differences
- Atlas offers more granular control over bundle lifecycle and management
- Small provides a simpler API for basic plugin-based development
- Atlas is better suited for large, complex applications with multiple teams
- Small is more appropriate for smaller projects or those new to modular development
Community and Support
- Atlas has stronger backing from Alibaba and a larger community
- Small has a smaller but active community with regular updates
- Both projects provide documentation, but Atlas offers more extensive resources
Performance Considerations
- Atlas generally offers better performance for large-scale applications
- Small has lower overhead for simpler projects
- Atlas provides more advanced features for optimizing app startup and runtime performance
A powerful and lightweight plugin framework for Android
Pros of VirtualAPK
- More comprehensive plugin system with support for complex resources and custom views
- Better integration with Android Studio for plugin development
- Supports dynamic loading of native libraries
Cons of VirtualAPK
- Steeper learning curve due to more complex architecture
- Potentially larger overhead for simple plugin scenarios
- Less focus on cross-platform development
Code Comparison
Small:
Small.setBaseUri("http://example.com/updates/");
Small.setUp(this, new Small.OnCompleteListener() {
@Override
public void onComplete() {
Small.openUri("main", MainActivity.this);
}
});
VirtualAPK:
PluginManager pluginManager = PluginManager.getInstance(this);
pluginManager.init();
File plugin = new File(Environment.getExternalStorageDirectory(), "plugin.apk");
PackageInfo info = pluginManager.loadPlugin(plugin);
pluginManager.startPluginActivity(this, new Intent().setComponent(
new ComponentName(info.packageName, "com.example.MyActivity")));
Summary
Small focuses on simplicity and cross-platform development, while VirtualAPK offers a more robust plugin system with deeper Android integration. Small may be better for simpler use cases or cross-platform projects, whereas VirtualAPK is more suitable for complex Android-specific plugin architectures. The choice between them depends on project requirements and development priorities.
Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Pros of Tinker
- More active development and maintenance
- Better documentation and community support
- Wider adoption in large-scale applications
Cons of Tinker
- More complex setup and integration process
- Larger codebase and potentially higher resource usage
- Steeper learning curve for beginners
Code Comparison
Small:
Small.setBaseUri("https://example.com/");
Small.setUp(this);
Tinker:
TinkerInstaller.install(this,
new DefaultLoadReporter(getApplicationContext()),
new DefaultPatchReporter(getApplicationContext()),
new DefaultPatchListener(getApplicationContext()));
Both Small and Tinker are Android hot-fix frameworks, but they differ in approach and features. Small focuses on modularization and plugin-based development, while Tinker emphasizes efficient patching and resource updating.
Small offers a simpler setup process and is more lightweight, making it suitable for smaller projects or those new to hot-fix solutions. Tinker, developed by Tencent, provides more robust features and is better suited for large-scale applications with complex patching requirements.
Ultimately, the choice between Small and Tinker depends on project size, complexity, and specific hot-fix needs.
A hotfix library for Android platform, and not just this...
Pros of Amigo
- More active development with recent updates and contributions
- Larger community support with more stars and forks on GitHub
- Comprehensive documentation and examples available in the repository
Cons of Amigo
- More complex setup and configuration process
- Steeper learning curve for beginners
- Limited cross-platform support compared to Small
Code Comparison
Small:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Small.setBaseUri("http://example.com/");
Small.setUp(this);
}
Amigo:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Amigo.init(this);
Amigo.loadPatch(this, patchFile);
setContentView(R.layout.activity_main);
}
Both Small and Amigo are Android libraries focused on modular development and hot-fixing. Small emphasizes a plugin-based architecture for building modular apps, while Amigo specializes in hot-fixing and dynamic patching. Small offers a simpler setup process and better cross-platform compatibility, making it more suitable for smaller projects or teams new to modular development. Amigo, on the other hand, provides more advanced features for hot-fixing and is better suited for larger, complex applications that require frequent updates without redeployment.
🔥 xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.
Pros of xCrash
- Focuses specifically on crash reporting and analysis for Android apps
- Provides detailed crash reports including native crashes and ANRs
- Supports multiple CPU architectures and Android versions
Cons of xCrash
- Limited to crash reporting functionality
- Requires more setup and configuration compared to Small
- May have a larger performance impact due to its comprehensive crash monitoring
Code Comparison
xCrash initialization:
xcrash.XCrash.init(this);
Small plugin loading:
Small.setBaseUri("http://example.com/");
Small.setUp(this);
Key Differences
Small is a lightweight plugin framework for modularizing Android apps, while xCrash is specifically designed for crash reporting and analysis. Small focuses on app modularization and dynamic loading, whereas xCrash provides comprehensive crash monitoring and reporting capabilities.
Small offers a more versatile approach to app development, allowing for easier maintenance and updates of individual modules. xCrash, on the other hand, excels in providing detailed crash information, which can be crucial for debugging and improving app stability.
The choice between these two libraries depends on the specific needs of the project. If modularization and dynamic loading are priorities, Small may be more suitable. For projects requiring robust crash reporting and analysis, xCrash would be the better option.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
ä¸çé£ä¹å¤§ï¼ç»ä»¶é£ä¹å°ãSmallï¼åæ轻巧ç跨平å°æ件åæ¡æ¶ã
å®ç½ï¼http://code.wequick.net/Small
æ¶æ
å¿«ç §
å ¥é¨
è¿é¶
Top Related Projects
A powerful Android Dynamic Component Framework.
A powerful and lightweight plugin framework for Android
Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
A hotfix library for Android platform, and not just this...
🔥 xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot